in reply to Regular Expression

Don't use regular expressions for this. Use printf or sprintf:
my $month = 7; $month = sprintf "%02d", $month;

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.

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!