in reply to Dualvars besides $!
I think you are misinterpreting the results of your test. (No, I was misunderstanding what point was being made. ;)
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:
for ( $! ) { print Scalar::Util::isdual($_), "\n"; }
...outputs '1', because in this case $_ is an alias to a dualvar. So we can add to the list:
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dualvars besides $!
by szabgab (Priest) on Jan 27, 2014 at 18:50 UTC | |
by davido (Cardinal) on Jan 27, 2014 at 19:44 UTC |