in reply to Merging 2 hashes - updated again
while (my ($mac, $bp) = each %mactobp) { $mactobp {$mac} = $bptoifIndex {$bp} if exists $bptoifIndex {$bp} }
Iterating over an hash just to find a certain index (what you are doing in the inner loop) is just silly. The reason to have hashes is to be able to quickly find keys, to avoid doing a linear search.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Merging 2 hashes
by rspence (Initiate) on Oct 30, 2003 at 00:25 UTC |