in reply to Re: Directory Listing to an Array
in thread Directory Listing to an Array
$map = 'c:\\some\\directory'
opendir (Directory, $map) or die "Cannot Open Directory";
@contents = readdir(Directory);
closedir(Directory);
splice(@contents, 0, 2); # removes " . & .. "
foreach $content (@contents) {
print "$content\n";
}
I have used this to capture the contents of a directory... Darrick...
|
|---|