in reply to Re: Re: How do you read the next line in a file while in a loop?
in thread How do you read the next line in a file while in a loop?

You are not reading the entire file. <> reads a line at a time just as it does in your while. (Perhaps that is why it is called the "line input operator" <grin>) In array context it can read the entire file into an array, but in scalar context it reads a line. It looked as though your file was multiple lines (based on seeing your while and your wished-for readln). If it is, then this should work.

HTH, --traveler