in reply to hash lookup
%GID = map { $temp[0] => $temp[1] } @temp;
This assigns two elements to %GID, throwing away all other items in that hash that might been in there before. Not what you want. Instead, just write $GID{$temp[0]} = $temp[1].
There's also no reason to build the @list1 and @list2 arrays. Finally you can get rid of %GID completely by first iterating over <FH2> and building %CVDgenes, and then iterate over <FH1> directly.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: hash lookup
by dr_joe (Initiate) on Oct 12, 2009 at 22:00 UTC | |
by moritz (Cardinal) on Oct 12, 2009 at 22:14 UTC |