Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: why use a hash instead of an array

by FloydATC (Chaplain)
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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2016-10-28 15:03 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (385 votes). Check out past polls.