$fh = FileHandle::new('File Name','mode'); $fn -> open('mode'); while($fh->getline()) { #stuff goes here } $fh -> close();