in reply to open and closing filehandles within a loop
Most of the time you see this message, because you didn't actually open the file (common reasons could be: the file does not exist, there are garbage chars in filename etc.). It is always a good practice to check the return code of function calls. In this case, what you should do is:
open(ABC, "<abc") || die "failed to open file\n";
Or something similar (usually you don't want to die, but handle it and continue with the next file).
|
|---|