Perl Monk, Perl Meditation | |
PerlMonks |
Re: Dualvars besides $!by davido (Cardinal) |
on Jan 27, 2014 at 17:41 UTC ( [id://1072257]=note: print w/replies, xml ) | Need Help?? |
Scalar::Util::isdual returns a true value if the variable being tested is a dualvar. Your test indicates that isdual is returning 1 when tested against $!, which is a true value, indicating that $! is a dualvar. Update: A list of "dualvar" special variables, as I find them.
Also, since $_ implicitly topicalizes a foreach loop, and since it's an alias to an iteration's topic, it can be made to appear to be a dualvar:
...outputs '1', because in this case $_ is an alias to a dualvar. So we can add to the list:
Dave
In Section
Seekers of Perl Wisdom
|
|