Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Accessing hash data via a reference

by samarzone (Pilgrim)
on Mar 21, 2011 at 12:04 UTC ( #894484=note: print w/ replies, xml ) Need Help??


in reply to Accessing hash data via a reference

I am quite sure you haven't written use strict in your script. Furthermore you are not viewing warnings if use warnings is on

How can you get any value in "brokers" when you have declared "broker" in the start of the loop!!!

Even if it would have been "broker" it would give compile time error under use strict

When you write %$broker{'engineWeight'} it will try to find the value of $broker{'engineWeight'} and will append to '%'. Since there is no hash like %broker (mind it - it is hash reference $broker) it will throw a compile time error.

--
Regards
- Samar


Comment on Re: Accessing hash data via a reference
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-07-26 18:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (178 votes), past polls