I haven't tested it, but I guess you could simply pass a parameter to your wanted call-back function:
my @dir = ( qw( N:/TMP N:/TMP_2 )); for my $dir ( @dir) { find( \&wanted ($dir), $dir ); }
And modify the wanted function as follows:
sub wanted { my $dir = shift; print "[$dir] $File::Find::dir $File::Find::name\n"; }
In reply to Re: File::Find in a loop
by Laurent_R
in thread File::Find in a loop
by vagabonding electron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |