Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://894484]
help
Chatterbox?
[Corion]: A good daystart to everybody ;)
[Discipulus]: good morning Corion et ceteri
choroba waves

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2016-12-07 08:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (125 votes). Check out past polls.