@tmp = () makes @tmp an array with zero elements. undef @tmp undefines @tmp. Check the output from:
my @foo = qw(foo bar baz); @foo = (); print "\@foo is defined.\n" if defined @foo; my @bar = qw(foo bar baz); undef @bar; print "\@bar is defined.\n" if defined @bar;
Owl looked at him, and wondered whether to push him off the tree; but, feeling that he could always do it afterwards, he tried once more to find out what they were talking about.
In reply to Re: how to clear an array
by HollyKing
in thread how to clear an array
by pglenski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |