in reply to One for the regexp fans
$str =~ s/(.[^\.]*)(\.?)/(substr("0" x 2 .$1, -2)).$2/ge; [download]