in reply to Can you find the name of a variable?
I know there are other ways to solve the actual problem
Just as simple as your code:
sub blah { my ($foo, $bar, $baz) = @_; for my $arg (qw( foo bar baz )) { croak("$arg missing/undefined") if !defined(shift); } ... }
but I'm curious if there is a way to know the name of a variable
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Can you find the name of a variable?
by JadeNB (Chaplain) on Nov 15, 2009 at 07:51 UTC | |
by ikegami (Patriarch) on Nov 15, 2009 at 08:44 UTC |
In Section
Seekers of Perl Wisdom