in reply to Removing leading zeros

didn't see a sprintf solution...

#!/usr/bin/perl use strict; my @num = ( "000006", "00005.55", "0004.5650"); foreach (@num) { print $_, " becomes: "; print sprintf("%d\n", $_); }
which produces....
000006 becomes: 6 00005.55 becomes: 5 0004.5650 becomes: 4