use Date::Parse qw(strptime); use POSIX qw(strftime); my $str = 'Oct 27, 2011'; my $newdate = strftime "%Y/%m/%d", strptime $str; print "$newdate\n";