or sometimes I use glob, but anyway, I always need to add a line or two to filter out . and .. which is quite annoying.my $dir="/path/to/dir"; opendir(DIR, $dir) or die "can't open $dir: $!"; my @files = readdir DIR; closedir DIR;
How do you usually go about this common task?
In reply to How do you list all files under a directory? by daverave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |