in reply to Using array elements for a file search
Your problem is that when the filehandle $INFILE reaches the end-of-file it will always return undef so after the first time through the foreach loop the while loop will never run, You have to either open the file inside the foreach loop or put the foreach loop inside the while loop.
|
|---|