Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Add Hash Key Based on Matching Another Key

by moritz (Cardinal)
on Jul 28, 2010 at 14:50 UTC ( [id://851730]=note: print w/replies, xml ) Need Help??


in reply to Add Hash Key Based on Matching Another Key

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.
  • Comment on Re: Add Hash Key Based on Matching Another Key

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://851730]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2025-07-13 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.