http://qs321.pair.com?node_id=498503


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:
my @a= (1..5) ; undef @a;
And since the range operator is evaluated in array context, we could also drop the parens:
my @a = 1..5; undef @a;