Mega Code Archive

 
Categories / Perl / File
 

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 }