open IN, "dnamorph.txt" or die $!; my %data; my $taxon; while () { if (/(^\w+)(\t+)(\w+)/) { $taxon = $1; push @{ $data{$taxon} }, $3; } }