Re: File::Find Win32 Examples
- From: Reinhard Pagitsch <rprp@xxxxxxx>
- Date: Thu, 27 Oct 2005 12:52:12 +0200
BartlebyScrivener wrote:
I am trying to learn Perl using the latest ActiveState on a Windows XP machine.
Most of the examples I find for using modules are made for Linux users. So when I set out to learn find2perl or File::Find the scripts usually don't work because of pathname problems, (or so I assume).
Could someone please supply a file::find example for a windows xp machine?
For instance, my drives are usually partitioned with data on d:\. How would I search all files on d: drive for any file containing the string "perl amateur"
Thank you for any help.
More detailed error messages would be helpfull to reproduce the problem. But it is similar the same as on UNIX/Linux, except that you have to use / instead of \.
eg: my $dir = "D:/test/data";
sub wanted { if(!-d $File::Find::name) { print $File::Find::name . "\n"; } }
find(\&wanted, $dir);
-- regards, Reinhard .
- Follow-Ups:
- Re: File::Find Win32 Examples
- From: BartlebyScrivener
- Re: File::Find Win32 Examples
- References:
- File::Find Win32 Examples
- From: BartlebyScrivener
- File::Find Win32 Examples
- Prev by Date: Re: Newb Needs Help with Simple ImageMagick Module
- Next by Date: Re: File::Find Win32 Examples
- Previous by thread: File::Find Win32 Examples
- Next by thread: Re: File::Find Win32 Examples
- Index(es):