Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: how to take a hash reference from main::,

by danger (Priest)
on Jan 04, 2001 at 04:03 UTC ( [id://49649]=note: print w/replies, xml ) Need Help??


in reply to how to take a hash reference from main::,

If $main::session alread holds a reference to a hash, then just assign that value (the reference) to the new variable (do not introduce another level of references):

%main::hash = (one => 1, two => 2, three => 3); $main::session = \%main::hash; my $session = $main::session; print $session->{two};

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-26 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found