Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 taking refuge in the Monastery: (10)
As of 2015-07-02 18:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls