use POSIX; my $time_string = strftime '%S %M %H %d %m %Y', ( localtime )[ 0..5 ]; print "$time_string\n"; __END__ 10 13 08 12 04 2005