@_ = (0,1,1900); $_ = sprintf '%4d.%02d.%02d', map {$_+pop @_} reverse +(localtime)[3..5]; # $_ = 2000.09.11 on Sept 11th, 2000. # Another way that is more readable is: my( $day, $month, $year ) = (localtime)[3..5]; $_ = sprintf '%4d.%02d.%02d', 1900+$year, ++$month, $day;