Doug, plz have a second look at the code (incl. errormsg) at the end of the post ... 8)
Cheers Rolf
UPDATE: Maybe it wasn't clearly enough expressed ...
for my $i ( LIST ) produces _aliases_ to the listelements (even to read-only values)!
It's NOT trivial (I would even say dangerous) when the explanation of closures has this extra complication, so it shouldn't be in any book.
In reply to Re^4: Constant value in anonymous sub (closures & aliases)
by LanX
in thread Constant value in anonymous sub
by Sewi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |