my( $sec, $min, $hour, $mday, $mon, $year ) = gmtime; my $datestamp = sprintf "%04d%02d%02d-%02d%02d", $year+1900, $mon+1, $mday, $hour, $min, $sec;