my $cond = sub { !-d $_[0] }; perform_check($cond); sub perform_check { my $cond = shift; ... if ($cond->($possible_directory)) { doSomethingElse(); } }
In reply to Re: Pass conditions to a subroutine
by pc88mxer
in thread Pass conditions to a subroutine
by PerlRob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |