in reply to Array Processing
There is little need to use for, while, or
recursion to delete all elements of @a. We could instead
use the undef operator:
And since the range operator is evaluated in array context, we could also drop the parens:my @a= (1..5) ; undef @a;
my @a = 1..5; undef @a;
In Section
Seekers of Perl Wisdom