|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re^2: The error says the value is uninitialized, but it works anywayby AnomalousMonk (Archbishop) |
| on Aug 18, 2019 at 06:34 UTC ( [id://11104633]=note: print w/replies, xml ) | Need Help?? |
|
Unfortunately, it's still altering an array (or it might have been a hash) over which you're iterating and so still incorrect:
Update: each sez: If you add or delete a hash's elements while iterating over it, the effect on the iterator is unspecified; for example, entries may be skipped or duplicated--so don't do that.The same obviously applies to arrays. The each doc goes on to discuss a specific exception involving delete and hashes, but still no joy WRT arrays. Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||