Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Peculiar incident: printing a variable changes its type

by mkhan (Sexton)
on Nov 13, 2013 at 09:08 UTC ( #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
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? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2014-10-31 07:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (215 votes), past polls