use POSIX 'str2time'; my $time = strftime '%m/%d/%Y %H:%M', localtime($time);