programming-examples/perl/File/The eof function can be used to test if end of file has been reached.pl

11 lines
186 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#Format:
#eof(FILEHANDLE)
#eof()
#eof
open ( DB, "data.txt") || die "Can't open emp.names: $!";
while(<DB>){
print if (/Norma/ .. eof); # .. is the range operator
}