|
|
| There's more than one way to do things | |
| PerlMonks |
Re^3: length() returns wrong result - suspicious magicby ikegami (Pope) |
| on Sep 15, 2010 at 15:35 UTC ( #860236=note: print w/ replies, xml ) | Need Help?? |
|
To assign a value to a scalar, there are a few steps to follow.
To obtain a value from a scalar, the same is done in reverse.
Some macros and functions do more than one of these steps for you.
No, at the start of the loop. After the fetch, but before you use it. There's no get magic on the scalar (GMG=0), so the fact that the set magic wasn't called earlier work won't matter. But when the value is assigned back to the scalar, the assignment will properly handle the set magic. If I'm right, I can provide a cheaper workaround than copying the string (which defies the purpose of binding).
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||