TATMWTDI There are too many ways to do it #7

Solution #2 - Sexeger

sub sexeger
{
    my $s = shift;
    $s=reverse($s);
    my $c = 0;
    $s=~s!\.!($c++)?"":"."!ge;
    return reverse($s);
}
Copyright © 2005 Shlomi Fish