Perl has no fixed distinction between "string" and "number". This is a bit problematic for modules like JSON that try to guess such concepts from circumstantial evidence.
My approach is to try to explicitly state whether I want a value to be treated as string or number by performing either string concatenation on it or an addition:
my $string = 3; my $number = "42"; my $data = { string => "".$string, number => 0+$number, };
In reply to Re: Did the JSON module change?
by Corion
in thread Did the JSON module change?
by nilesOien
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |