use Date::Calc qw/:all/; my $str = "Thu Jan 8 07:01:05 2004"; $time = Date_to_Time(Parse_Date($str), $str =~ /(\d\d):(\d\d):(\d\d)/ );