in reply to Re^3: Constant value in anonymous sub (closures & aliases)
in thread Constant value in anonymous sub
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Constant value in anonymous sub (closures & aliases)
by doug (Pilgrim) on Feb 23, 2010 at 14:27 UTC | |
by LanX (Saint) on Feb 24, 2010 at 14:56 UTC |