in reply to
Regular Expression
Don't use regular expressions for this. Use
printf
or
sprintf
:
my $month = 7; $month = sprintf "%02d", $month;
[download]
davis
It wasn't easy to juggle a pregnant wife and a troubled child, but somehow I managed to fit in eight hours of TV a day.
Comment on
Re: Regular Expression
Download
Code
Replies are listed 'Best First'.
Re^2: Regular Expression
by
Anonymous Monk
on Aug 05, 2004 at 13:59 UTC
Thank you all, good one!
[reply]
In Section
Seekers of Perl Wisdom