On Thursday 22 Apr 2010 02:56:44 Shawn H Corey wrote:
> Harry Putnam wrote:
> > I've run into one of those things where I can't see why my code
> > fails. ... and know it has to be something obvious.
> > 
> > Why does the second usage of stat... fail in the find() funciton?
> 
> File::Find changes the working directory to each subdirectory as it
> processes it.  To prevent this, set the no_chdir flag.  See `perldoc
> File::Find` for details.  http://perldoc.perl.org/File/Find.html

I should note that from this reason, File-Find-Object (see 
http://www.shlomifish.org/open-source/projects/File-Find-Object/ ) never 
changes directory by default (although I believe that was part of the original 
design before I started maintaining F-F-O), because it is counter-intuitive 
and dangerous.

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
First stop for Perl beginners - http://perl-begin.org/

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to