in reply to
formatting zipcodes
If i understand you well, then you have at least 2 (simple) solutions:
Brute force:
print "0" x (5 -length($zip)), "$zip";
Much more elegant ;-):
printf ("%05d", $zip);
I would use the second one ;-)
Greetz, Tom.
Comment on
Re: formatting zipcodes
Select
or
Download
Code
In Section
Seekers of Perl Wisdom