in reply to File::Find in a loop
In the "for my $dir" loop, $dir is LOCAL to the block enclosed by the "for" loop, so the "wanted" sub cannot see it.
To fix, keep $dir global:
my $dir; for $dir (@...)...
"I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
-- Dr. Cox, Scrubs
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File::Find in a loop
by Anonymous Monk on Apr 29, 2013 at 09:05 UTC | |
by NetWallah (Canon) on Apr 29, 2013 at 15:19 UTC | |
by Anonymous Monk on May 01, 2013 at 08:42 UTC |