Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Regarding Initialization and Use of Hashes

by CountZero (Bishop)
on Sep 05, 2012 at 08:13 UTC ( #991773=note: print w/ replies, xml ) Need Help??


in reply to Re: Regarding Initialization and Use of Hashes
in thread Regarding Initialization and Use of Hashes

Even more important, check your brackets!

  • $variable[1] returns an array element
  • $variable{'one'} returns a hash value
Both are of course scalars as indicated by the $ sigil.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics


Comment on Re^2: Regarding Initialization and Use of Hashes
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2014-12-25 16:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls