Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Reference Example

by VSarkiss (Monsignor)
on May 20, 2002 at 15:44 UTC ( [id://167851]=note: print w/replies, xml ) Need Help??


in reply to Reference Example

Well, it's not an array reference, as your comment indicates:#set reference for hashTry this: print "The value for the key \"mickey\" is $$fer{'mickey'}\n";That is, use curly braces {}, not square ones [].

A slightly cleaner way to write that would be: print "The value for the key \"mickey\" is $fer->{mickey}\n";

Just as a general comment: if you're trying to get your hands around the basics, references may be a little too much too soon. But I can't really say that applies to you specifically since I don't know. Good luck, HTH.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-03-29 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found