It's easy to define a function that works like undef but allows multiple arguments. For example:
sub undeff { @_[0..@_-1] = (); }; $foo = 5; $bar = 8; undeff($foo, $bar); # this undefs both of them print "foo=[$foo] bar=[$bar]\n"; # prints `foo=[] bar=[]' and two warn +ings
In reply to Re: undef a List of Variables
by ambrus
in thread undef a List of Variables
by Dr. Mu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |