Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Answer: Is it better to return a hash of hashes or a reference to a hash of hashes?

by merlyn (Sage)
on Oct 08, 2001 at 19:20 UTC ( #117472=categorized answer: print w/replies, xml ) Need Help??

Q&A > subroutines > Is it better to return a hash of hashes or a reference to a hash of hashes? - Answer contributed by merlyn

References are a single item, while lists are the entire list. In terms of speed, it's more expensive to pass a list than an single item. However, "better" is a relative term, so without more context...

  • Comment on Answer: Is it better to return a hash of hashes or a reference to a hash of hashes?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2017-10-17 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (225 votes). Check out past polls.

    Notices?