isn't dualvar's made by peeking at the internals ?
Eventually, everything Perl is done by doing something with the internals. However, all dualvar exposes is that values can have both a numeric and a string value. One could change large parts of the internals without having to change the interface of dualvar. However, the solution presented queries internal bits of the SV structure.
is dualvar(undef,"string") zero ?
Yes. There's no way to store "undef" in the IV slot of an SV. AFAIK, the undef has been (auto)cast to 0 before the SV will be created.
| [reply] [d/l] [select] |