4 ms·
Dualvars come up naturally. Treat a number as a string (try using Data::Dumper on some scalars) and suddenly your json ends up coming out like: {"something": "1
by tech2 10y ago
Dualvars come up naturally. Treat a number as a string (try using Data::Dumper on some scalars) and suddenly your json ends up coming out like: {"something": "12"} rather than {"something": 12}
Just because both slots are filled with the same "value" in perl, doesn't mean it's _not_ a dualvar. It's just a side-effect of the way scalars in Perl work.
- berntb 10y agoOf course. But I get your our point -- this is a corner that might bite you. It don't happen to me often, but I sprinkle "+ 0" and so on, without thinking about it.