in reply to Directory creation with current Date

One more way to get the date
my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = l +ocaltime( time) ; my $return ; $mon++ ; $year += 1900 ; $return = sprintf "%02d-%02d-%4d", $mday , $mon ,$year;

Replies are listed 'Best First'.
Re^2: Directory creation with current Date
by Anonymous Monk on Jan 20, 2005 at 01:23 UTC
    you could probably simplify that a bit:
    my ($day,$mo,$year) = (localtime)[3,4,5]; return sprintf '%02d-%02d-%04d', $day , $mo + 1, $year + 1900;