Help for this page

Select Code to Download


  1. or download this
      my( $sec, $min, $hour, $mday, $mon, $year ) = gmtime;
      my $datestamp = sprintf "%04d%02d%02d-%02d%02d",
        $year+1900, $mon+1, $mday, $hour, $min, $sec;
    
  2. or download this
      my $error_log = "error-$datestamp";
      open STDERR, "> $error_log" or
        warn "Error redirecting stderr to $error_log: $!\n";