Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Problem with File::DirWalk and Active Perlby kcott (Archbishop) |
on Mar 15, 2012 at 22:43 UTC ( [id://959881]=note: print w/replies, xml ) | Need Help?? |
The first line of code you show (from File::DirWalk) leaped out at me as being wrong.
To avoid operator precedence problems (see perlop), this should be written as:
or
Also note that this provides no feedback on why opendir failed. I thought I'd give your code a try and installed File::DirWalk. During the make test phase, I received the same errors (at the same line numbers) you're reporting but the output showed testing was successful.
At this point, I decided not to test your code with a module which did not install cleanly. I had a look at File-DirWalk reviews. These are generally negative. I'd suggest using File::Find. Callbacks are available through The wanted function. It's also a core module so no installation is required. Not directly related to your problem but I'd recommend taking a look at File::Spec. This is also a core module and provides functions which will allow you to avoid hand-crafting non-portable code such as:
-- Ken
In Section
Seekers of Perl Wisdom
|
|