$ver = 10; #loop and split the line if ($ver <= $sw_fields[2]) { $by_sw{$sw_fields[0]}{$sw_fields[2]}++; $swvercount++; }