drock has asked for the wisdom of the Perl Monks concerning the following question:

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 200505162005 when all I need is 05162005 thx derek