![]() |
|
Think about Loose Coupling | |
PerlMonks |
Re: Add Hash Key Based on Matching Another Keyby moritz (Cardinal) |
on Jul 28, 2010 at 14:50 UTC ( [id://851730]=note: print w/replies, xml ) | Need Help?? |
If you store the hash references not in an array, but in a hash (and keyed by MAC address), you can get rid of the linear scan over the array. If you need to preserve the order, just store two references to each hash, one in the array, one in the hash.
Perl 6 - links to (nearly) everything that is Perl 6.
In Section
Seekers of Perl Wisdom
|
|