Help for this page

Select Code to Download


  1. or download this
      $mday = sprintf('%02d', $mday) ;  # Not used in this script, but ret
    +urns a 2 digit day
            $mon  = sprintf('%01d', ++$mon) ; # Returns a 1 digit month un
    +til we get to 10 then use 2, not my choice.
            $year = 1900 + $year ; # Returns a 4 digit year
            $outdir = "_" . $year . "\\" . $mon . "\\" ; # Build the direc
    +tory name based on date where the file is going \_2011\9\
    
  2. or download this
    my $ym = Time::Piece->new($mtime)->strftime("%Y\\%m");
    
    ...
    $ym =~ s/0(\d)$/$1/;
    
    my $outdir = "_$ym\\";