good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If Perl, itself, does not internally know a value is a number, how can it convert a number to a string? Looking at Mojo::JSON and JSON::Tiny, they both seem to be "pure Perl" implementations, so they would have to use heuristics. Looking at perlapi: SvNIOK "Returns a U32 value indicating whether the SV contains a number, integer or double." So, it seems that, internally, Perl knows if a scalar is a number. In reply to Re^4: Bring back the smartmatch operator (but with sane semantics this time)!
by RonW
|
|