open(FILE, "; # no need to use memory that way # a lot of the input line will be # thrown away close(FILE); #### open(FILE, "<", "x.log") or die "unable to open x.log $!"; while my $line () { ... process each $line... }