Help for this page

Select Code to Download


  1. or download this
    my $age = (stat $remote)[9];
    my $cutoff = time - 86400 * 7; # now less 7 days
    if( $age < $cutoff ) {
      # file is older
    }
    
  2. or download this
    my $dirname = sub {
        sprintf '%02d%02d%02d%02d%02d%02d', $_[0] % 100, @_[1..5]
      }->((localtime)[5,4,3,2,1,0]);