use POSIX::strptime; use Time::Local; my $result = timelocal strptime $d, '%a %b %e %H:%M:%S %Y';