in reply to rearranging a string.new
Your arguments were completely wrong. Maybe you should reread the documentation for substr. Corrected:
which can be simplified tomy $newstring = substr($string, 4, 2) # Month (was at 4 len 2) . substr($string, 6, 2) # Day (was at 6 len 2) . substr($string, 0, 4); # Year (was at 0 len 4)
my $newstring = substr($string, 4, 4) # M+D (was at 4 len 4) . substr($string, 0, 4); # Year (was at 0 len 4)
In Section
Seekers of Perl Wisdom