Hi all,

I need to get a unique list of directories/sub-dirs,
etc for certain drives...the problem is, when I run
the following code, I get loads and loads of
duplicates, which isn't what I want.

Can anyone tell me what is wrong with my code? It
works fine with files.

#!/perl/bin -w

use strict;
use File::Find;
open (DEST, ">c:/temp/p_drive.txt") || die "opening
log file: $!";
sub getlist {
 
  print DEST "$File::Find::dir\n";
  print "$File::Find::dir\n";
}

find \&getlist, 'p:/';

Ben

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to