Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Data::Dumper turns floating points numbers into strings

by ig (Vicar)
on Jun 14, 2011 at 18:43 UTC ( [id://909626]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    printf "before: '%s'\n", $json->encode($data);
    print "$data->{qux}\n";
    printf "after: '%s'\n", $json->encode($data);
    
  2. or download this
    before: '{"qux":0.42,"foo":"bar"}'
    0.42
    after: '{"qux":"0.42","foo":"bar"}'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://909626]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-19 02:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found