in reply to Re: Re: Re: Zero Padding
in thread Zero Padding
Not the shortest, but a valid solution. Of course, I'd use printf() as mentioned zillions of times.my $num=42; my $padto="000000"; # padding to 6digs $num=$padto.$num; print substr($num,-6), "\n";
--
Me spell chucker work grate. Need grandma chicken.
|
|---|