sub findNewerThan { my $days_ago = days(shift); return sub { my $filename = $File::Find::name; return unless -f $filename; #...do something with $days_ago push(@files, $filename); } } find( findNewerThan(5), $file_dir_root );
In reply to Re: Passing a parameter to a callback
by runrig
in thread Passing a parameter to a callback
by thezip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |