if (($2 ge $min) && ($2 le $max) && /$key/) { push(@{$mylist{$2}}, $_); }