in reply to Why does a full iteration over array & shift is not emptying the array
this makes a copy of the elements of @arr to loop over, without using a (named) variable.for my $x (@{[]} = @arr) { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why does a full iteration over array & shift is not emptying the array
by almut (Canon) on May 04, 2010 at 17:02 UTC |