In perl, there typically never is a need to empty an array. If you limit the scope of your array to the loop block, you'll simply get a new empty array every time through the loop. Simple, effective, and very generically appliable.
for (1 .. 3) { my @flowers; # new, emtpy array, every time ... }
In reply to Re: How to empty an array ???
by bart
in thread How to empty an array ???
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |