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