in reply to (kudra) Re: Reading entire file.
in thread Reading entire file.

The lines will not contain both $foo and $bar at the same time. As a very newbie I do not understand exactly what your code is saying. (my programming experiance comes from pascal programming in high school 6 years ago.) Also, how does Perl know that it is at the end of a file?