Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: why use a hash instead of an array

by FloydATC (Deacon)
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2018-03-18 14:16 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (230 votes). Check out past polls.