Help for this page

Select Code to Download


  1. or download this
    sub checkForDirectory (&) {
      my $cond = shift;
    ...
    ## ...
    my $result = checkForDirectory { ! -d $_[0] };
    my $also_result = checkForDirectory sub { -M $_[0] > 2 }
    
  2. or download this
    my $predicate = sub { $_[0] =~ /^\d{4}-\d{2}-\d{2}/ };
    my $other_result = &checkForDirectory( $predicate );