I'm not sure what the problem is, exactly. Do you want to just know when the program has finished reading?
use strict; use warnings; my $file = "file.txt"; open FH, "<", $file; while(<FH> { # do something here... } print "End of file has been reached\n";
I think that ought to do it for you, though I haven't actually tested the code.
In reply to Re: Example for EOF
by spiritway
in thread Example for EOF
by l.frankline
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |