http://www.perlmonks.org?node_id=77883


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?

Stuffy

Replies are listed 'Best First'.
(ar0n: eof) Re (2): (kudra) Re: Reading entire file.
by ar0n (Priest) on May 04, 2001 at 13:20 UTC
    See eof:
    if ( eof FILEHANDLE ) { print "Reached end of file.\n"; }


    ar0n ]