develooper Front page | perl.beginners | Postings from January 2002

RE: File::Find and Platform Capability

Thread Previous | Thread Next
From:
Nikola Janceski
Date:
January 30, 2002 12:15
Subject:
RE: File::Find and Platform Capability
Message ID:
1449413DA482D311B67000508B5A12F50592DC44@nyexchange01.summithq.com
try using
 find( \&wanted, "D:/");

-----Original Message-----
From: J.Hourihane@cdcixis-cmna.com [mailto:J.Hourihane@cdcixis-cmna.com]
Sent: Wednesday, January 30, 2002 3:03 PM
To: beginners@perl.org
Subject: Re: File::Find and Platform Capability


I am having difficulty opening a directory and recursively listing the files
on NT Win32
I can do it on Unix but when I try it on NT with both UNC and drive letter I
get nothing...

Unix 
#######################
!/util/perl5.static -w
use File::Find;
open(OUT, ">docs.out");

 sub wanted
 {
	
     print OUT "$File::Find::name\n";

 }

 find( \&wanted, "/docs/1");

close(OUT);
#####################

NT
######################
use File::Find;
open(OUT, ">docs.out");

 sub wanted
 {
	
     print OUT "$File::Find::name\n";

 }

 find( \&wanted, "D:\\");

close(OUT);
#######################

Jaime Hourihane

-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About