in reply to Formatting a date

A Perl solution would be to use the match operator to match all two-character substrings, and then catch the matches, like so:

$time = "0406141832"; ($y,$m,$d,$h,$min) = $time =~ /../g; print "$m $d, $h:$min"