Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: IMport a variable from another file

by tos (Deacon)
on Jun 23, 2003 at 20:01 UTC ( [id://268299]=note: print w/replies, xml ) Need Help??


in reply to IMport a variable from another file

If you use global variables instead of lexically defined ones you have the possbility to access vars of another package (=namespace) via ::-notation. You then can access the "Paul"-value of friends.pm's hash %friends for instance with

print $friends::friends{"Paul"}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-03-28 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found