in reply to Re^2: Escaping confusion in RE...
in thread Escaping confusion in RE...

If @file is an array then you want a for loop, not a while loop. If you want to read lines from a file into $_ then you want while ( <FILE> ) {

I.e., you do have an infinite loop, @file has a constant number of things in it, so it is always true, unless you shift or pop things from it in the loop. (but a for loop is probably more appropriate).