I would also add that for scalability you should always iterate over a directory as opposed to pushing all of the filenames into an array.
I would also use a lexical directory handle.
my $dir = "/and/evel/aap/list/60"; opendir(my $d, $dir) || die "Unable to open $dir "; while (my $filename = readdir($d)) { # removes . and .. next if ($filename =~ /^\.+$/); my $filepath = "$dir/$filename"; ..... } closedir($d);
In reply to Re: Reading Directory
by tokpela
in thread Reading Directory
by Sun751
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |