Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Peculiar incident: printing a variable changes its type

by mkhan (Sexton)
on Nov 13, 2013 at 09:08 UTC ( [id://1062356]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use JSON;
    
    ...
    print "$body->{timeout}\n"; #<-----suspect line
    my $body_string = to_json($body);
    print "$body_string";
    
  2. or download this
    Output: 
    2000
    {"timeout":"2000"}
    
  3. or download this
    use JSON;
    
    ...
    $body->{"timeout"} = (defined $params->{timeout}?$params->{timeout} : 
    +3000);
    my $body_string = to_json($body);
    print "$body_string";
    
  4. or download this
    Output: 
    {"timeout":2000}
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1062356]
Approved by mje
Front-paged by mje
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-23 22:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found