See (s)printf, which can be coerced into right-padding with zeros (instead of spaces) if the string is shorter than a desired length...
my $zip = sprintf "%05d", 9876;
--k.
In reply to Re: formatting zipcodes
by Kanji
in thread formatting zipcodes
by mumphis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |