I stumbled across this problem while thinking of how to replace my `find ... ` commands with the find() subroutine implemented in File::Find module. According to docs, find() may accept a reference to a sub, which really benefited my code in that I didn't have to modify it much. However, I still have to pass 'custom' skip matches (for files/directories) in form of an argument in order to achieve desired results.Just pass it as a closure variable. In fact, in your example, just referring to $skip_match will give you the right value!
-- Randal L. Schwartz, Perl hacker
In reply to Re: Arguments to anonymous subs
by merlyn
in thread Arguments to anonymous subs
by vladb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |