The code that I was trying to modify was...
my %hash;
while(<DATA>){
chomp;
my @line = split /\t/;
my $first = shift @line;
push( @{$hash{$first}}, @line );
}
foreach( sort keys %hash ){
print OUT "$_\t".join("\t", sort @{$hash{$_}})."\n";
}
Comment on Re^2: Removing redundancy in X and Y directions