in reply to Re: Why does a full iteration over array & shift is not emptying the array
in thread Why does a full iteration over array & shift is not emptying the array

FWIW, adding an empty list also makes a copy of the elements (on the internal stack) to iterate over:

for my $x ((), @arr) { ... }
  • Comment on Re^2: Why does a full iteration over array & shift is not emptying the array
  • Download Code