hi perl friends,

i wrote the code below to find all files ending in '.plx' then tell me where
they are. it is suppose to print out the unique directories only. but it
seems to be printing out redundantly as many times as there are .plx files
in that same directory.
can anybody tell me what's wrong with my code?
thanks for you help!
jim


use File::Find;

find(\&wanted, "c:/perluser/");

sub wanted {
 my @dir = "$File::Find::dir"if m/\w\.plx/i;
 print "@dir\n";
 my %seen;
 my @unique_dir = grep {! $seen{$_}++} @dir;
  foreach $dir_in (@unique_dir) {
   #print "$dir_in\n";
   $count++
  }
}
 print "\n", 'There are ', "$count", ' files', "\n";

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to