We don't bite newbies here... much | |
PerlMonks |
Re^2: Higher resolution $^T?by ikegami (Patriarch) |
on Jun 23, 2014 at 02:17 UTC ( [id://1090867]=note: print w/replies, xml ) | Need Help?? |
If something were to replace $^T, it would also replace the magic.
When assigning to a variable with set magic, the value is assigned as normal, then the magic handler is called. When fetching from a magical variable with get magic, the magic handler is called to replace the value of the variable, then the fetch happens as normal. This means you see the value assigned to the scalar in the scalar, but that value is meaningless because it gets clobbered when you read from the scalar. The magic behind $^T is equivalent to the following:
In Section
Seekers of Perl Wisdom
|
|