my $datetime = localtime(time); # returns Thu Nov 22 13:05:26 2001 # (well at least it did at the time() )