my %row; while(<>){ next if /^#/; # if there's "one or more" then there's one! chomp; my @data=split; $row{ @data[0,3,4] }=$data[5]; }