The eof function can be used to test if end of file has been reached. : eof « File « Perl






The eof function can be used to test if end of file has been reached.

    

#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
}

   
    
    
    
  








Related examples in the same category