in reply to Re: Passing file check operators to a function
in thread Passing file check operators to a function
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.
|
|---|