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

Re: Regarding Initialization and Use of Hashes

by linuxkid (Sexton)
on Sep 04, 2012 at 19:23 UTC ( #991682=note: print w/replies, xml ) Need Help??

in reply to Regarding Initialization and Use of Hashes

Always check your sigils!

  • Comment on Re: Regarding Initialization and Use of Hashes

Replies are listed 'Best First'.
Re^2: Regarding Initialization and Use of Hashes
by CountZero (Bishop) on Sep 05, 2012 at 08:13 UTC
    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.


    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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991682]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2018-06-24 09:50 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.