in reply to Re: Re: Re: Zero Padding
in thread Zero Padding

In the spirit of TIMTOWTDI, I offer my version from my FPBASIC days:
my $num=42; my $padto="000000"; # padding to 6digs $num=$padto.$num; print substr($num,-6), "\n";
Not the shortest, but a valid solution. Of course, I'd use printf() as mentioned zillions of times.

--
Me spell chucker work grate. Need grandma chicken.