{ local $/ = '>'; # you were looking for this one, right? open(FILE, "bigfile.big") or die $!; while () { # do interesting stuff # e.g. merely count lines... } close FILE; }