Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Can you find the name of a variable?

by chromatic (Archbishop)
on Nov 13, 2009 at 19:25 UTC ( #807034=note: print w/ replies, xml ) Need Help??


in reply to Can you find the name of a variable?

Untested, but:

use PadWalker 'var_name'; for my $arg (\($foo, $bar, $baz)) { next if defined $$arg; my $name = var_name(0, $arg); croak "You forgot to define $name!\n"; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2016-06-26 17:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (331 votes). Check out past polls.