So, as I noted above, when I installed JSON::XS, the behavior went back to what it was before, this :
my $data3;
$data3->{"num"} = "3";
my $addr = $data3->{"num"} + 7;
my $body3 = $json->encode($data3);
print $body3;
Prints this :
{
"num" : "3"
}
What's the moral of the story here? Is it that I should always install JSON::XS? Or that I should type explicitly by doing stuff like :
$var = "" . $var;
Before sending stuff off to JSON? And/or did I just get a "bad" release of JSON for my purposes? Or all of the above?