open FILE, "somefile" or die $!; while (<FILE>) { # do stuff } close FILE; [download]
In reply to open, file handles and memory by Viking