in reply to how to clear an array
@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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to clear an array
by Anonymous Monk on Feb 25, 2006 at 13:41 UTC | |
by HollyKing (Pilgrim) on Feb 25, 2006 at 18:27 UTC |