in reply to Read a list of files into an array
Or, even more compact way to use glob,
to get files with the .txt extension. If you want to consider all files for more accuracy, use -f and File::Type to filter <$dir/*>.my $dir = "/path/to"; # or however you initialize my @array = <$dir/*.txt>;
After Compline,
Zaxo
|
|---|