in reply to Leading Zeros

Quick and dirty code, as I seem to have a better way on the tip of my brain that I can't quite recall. This should help for now.
my $x = "1.10.9.2"; my $y = sprintf ("%03d.%03d.%03d.%03d", split (/\./, $x));