mabman has asked for the wisdom of the Perl Monks concerning the following question:
I can't seem to get File::Find to do anything on Win32 (WinNT with latest Activestate release build).
The relevant code snippet from my larger script is as follows:
use File::Find (); $File::Find::dont_use_nlink=1; # I found a post here that said somethi +ng about setting this if you intend to run it on DOS, and I did as I +may want to run it on Win95/98 as well # I'm looking for "eudora.ini" on my system and I want it to search fr +om the root of C: (and it definitely exists on my system) File::Find::find( {wanted => \&wanted}, 'C:/' ) || die "Can't search f +or file: $" ; sub wanted { /^eudora\.ini\z/s; } print ($File::Find::name);
Right now, it doesn't print anything, and my hard drive doesn't spin at all.
I've also tried substituting '/' and 'C:/' instead of 'c:/', but it made no difference.
The rest of my script below the above code works just fine, it's just this piece that's giving me grief :)
Thanks for all suggestions.
Glenn
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File::Find on Win32 - basic problem/question
by Aristotle (Chancellor) on Oct 02, 2003 at 19:36 UTC | |
by mabman (Novice) on Oct 02, 2003 at 21:35 UTC | |
|
Re: File::Find on Win32 - basic problem/question
by shenme (Priest) on Oct 02, 2003 at 19:52 UTC | |
|
Re: File::Find on Win32 - basic problem/question
by bart (Canon) on Oct 02, 2003 at 21:21 UTC | |
by roik (Scribe) on Oct 03, 2003 at 12:59 UTC | |
|
Re: File::Find on Win32 - basic problem/question
by NetWallah (Canon) on Oct 02, 2003 at 19:34 UTC |