Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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.

- Samar

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2015-11-28 13:03 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (741 votes), past polls