Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How to pass a variable to function selected from a hash

by arturo (Vicar)
on Jan 18, 2001 at 04:34 UTC ( [id://52649]=note: print w/replies, xml ) Need Help??


in reply to How to pass a variable to function selected from a hash

Ugly solution, off the top of my head. I hate myself for proposing this. I hope someone will save us from:

Define a global (or file-level my variable), $val, have each sub do my $arg = $val ... ?

There's got to be a better way though =)

Update Oh, OK. I thought the problem was that the args weren't being passed to the coderefs at all =) Nothing to see, move along ... I'll feel foolish either way =)

Philosophy can be made out of anything. Or less -- Jerry A. Fodor

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-19 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found