use strict; use Date::Manip; my $from = 'Wed Dec 29 08:17:04'; my $to = UnixDate($from, "%y-%m-%d_%H:%M:%S"); print "$to\n";