in reply to Re^2: Reading all files in a directory with one filehandlein thread Reading all files in a directory with one filehandle
See also readdir documentation for further explanation and examples.