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

Re: File::Find and Platform Capability

Thread Next
From:
J.Hourihane
Date:
January 30, 2002 11:58
Subject:
Re: File::Find and Platform Capability
Message ID:
9877566273EED511A7560008C716DA06B355@exchcpn1.cdcna.com
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

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