open(FH, 'someLargeFile.txt') || die "Unable to open file: $!"; foreach () { .. #do something }