Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: why use a hash instead of an array

by FloydATC (Hermit)
on Jun 12, 2013 at 00:34 UTC ( #1038366=note: print w/ replies, xml ) Need Help??


in reply to why use a hash instead of an array

are hashes just there for convenience

In a nutshell, yes. Any task that lends itself well to using a hash could be solved using some other method*, but your code would be longer and more difficult to write and maintain. Most Perl programmers strive to do as little work as possible and let the computer take care of the heavy lifting :-)

*) In fact, the CPU doesn't have a clue what a hash is so the problem is actually solved some other way even if you do use a hash

-- FloydATC

Time flies when you don't know what you're doing


Comment on Re: why use a hash instead of an array

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2014-09-23 13:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (221 votes), past polls