Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Making variables visible between calls.

by eric256 (Parson)
on Dec 12, 2008 at 20:13 UTC ( [id://730034]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Making variables visible between calls.
in thread Making variables visible between calls.

It sounds like you realy want to pass it a hash. Then just preload the hash with values that it should have access to.

my $function = sub {my $v = shift; print ">> $v->{var} <<\n" }; my $params = {var => 'exto'}; $function->($params);

___________
Eric Hodges

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found