sub date2str { my ( $month, $day, $year, $rest } = @_; sprintf( "%04d%02d%02d%s", $year, $month, $day, $rest ); }