In my situation I have a string like so:
my $string = '20050516';
and I want to rearrange it to look like: 05162005, so I tried:
my $newstring =
substr($string,0,8).substr($string,0,4).substr($string,8,0);
But my problem is: it's leaving 2005 in the beginning of the string to look
like
On Nov 21, [EMAIL PROTECTED] said:
In my situation I have a string like so:
my $string = '20050516';
and I want to rearrange it to look like: 05162005, so I tried:
my $newstring =
substr($string,0,8).substr($string,0,4).substr($string,8,0);
That should be:
substr($string, 4, 2) .
Subject
Re: rearranging a string
Subject
Re: rearranging a string
On 11/21/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
In my situation I have a string like so:
my $string = '20050516';
and I want to rearrange it to look like: 05162005, so I tried:
my $newstring =