in reply to Get File list from the path

If it's just a fixed depth, the quick way is globbing:
my @list = <dir/*.dat>; print join("\n", @list);
for a recursive solution, the only way I know is to used opendir, readdir, closedir and write a recursive subroutine processing the files one at a time.