It’s meant to obtain a list of directories. However when running this script it takes ages to populate the array with entries. And most of the directories are duplicated number of times. Does any one know the reason for this and is there a better way to obtain a list of directories quicker than this very slow method.use strict; use File::Find; my $path = shift @ARGV; my @dirs; find (sub {push @dirs, $File::Find::dir}, $path); foreach my $dir (@dirs){ print "$dir\n";}
In reply to Retrieving a List of directories only by blackadder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |