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
In reply to Re: Can you find the name of a variable?
by ikegami
in thread Can you find the name of a variable?
by pileofrogs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |