in reply to
Zero Padding
You can do this just using
sprintf
:
$padded = sprintf "%06d", 13;
The zero after the percent sign says to pad with zeros instead of spaces.
Comment on
Re: Zero Padding
Download
Code
In Section
Seekers of Perl Wisdom