in reply to Re^2: how to make variable forget its previous value?
in thread how to make variable forget its previous value?

open(my INFILE, ... ... while(<INFILE>){ ...

If using a lexical filehandle, this should be
   open(my $INFILE, ...
and
    while(<$INFILE>){ ...
(scalar  $INFILE rather than  INFILE).

Update: Also, I think you still need a test to specially handle the cases of files with zero or one records, e.g., (still untested)
    next FILE if @column8 < 2;  # are min/max valid?
from my original reply.