open DNAA, "dna.nxs" or die $!; my %ddata; while () { if (/(^\w+)(\t+)(\w+)/) { $ddata{ $1} = { dna => $3, }; } }