my ($sec, $min, $hour, $mday, $mon, $year) = reverse split /[:\s-]+/, $datestr; print "sec:$sec min:$min hr:$hour mday:$mday mon:$mon year:$year\n";