sub listfiles { $path = shift; $path = "." unless $path; opendir( DIR, $path ) || die "Can't open $path: $!"; !/^\./ and push @entry, "$_\n" while ($_ = readdir(DIR)); #removes + the . and .. entries from readdir closedir( DIR ); return @entry; }
In reply to Directory Listing to an Array by Poetic Justice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |