The array @files only contains the filenames without the full path. Prepend the path of the directory to the filename. And please use some more modern code for open:
In reply to Re: Reading all files in a directory with one filehandle
by tinita
in thread Reading all files in a directory with one filehandle
by rahulruns
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |