# find "captured" in subroutine use strict; use File::Find; my @dirs = qw( /devel/dir1 /devel/dir2 ); my $exten = '.xml'; my @files = _get_files(\@dirs, $exten); sub _get_files{ my $dirs = shift; my $what = shift; my @files; my $want = sub { -f && /\Q$exten\E$/ && push @files, $File::Find::name }; find($want, @{$dirs}); @files }
In reply to Re: Recursive file search
by sh1tn
in thread Recursive file search
by mellin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |