in reply to Re: Passing file check operators to a function
in thread Passing file check operators to a function

Modified GrandFather's code a bit so that you don't have to loop through to test

sub checkit { my ($tests, $filename) = @_; my @testList = split ",", $tests; my $teststr = shift(@testList) . " '" . $filename . "'" . " && " . join (' _ && ', @testList) . " _"; return eval ("($teststr)"); return 1; }

Not very clean but at least it saves you too many stat calls.