in reply to Re: Date formats
in thread Date formats

Personally, I've always prefered (s)printf when padding numbers ...

my($d,$m) = (localtime)[3,4]; my $date = sprintf("%02d/%02d",++$m,$d);

    --k.


Update: Oops, meant to ++$m not $m++. Thanks to blakem for the catch.