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

Re^7: json return value

by Anonymous Monk
on Jul 16, 2013 at 08:23 UTC ( [id://1044533]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     #!/usr/bin/perl --
    use strict;
    use warnings;
    ...
    
    print $q->header("application/json");
    print $json->encode({ c => $c });
    
  2. or download this
     #!/usr/bin/perl --
    use strict;
    use warnings;
    ...
        return $json->encode({ c => $c });
    }
    
  3. or download this
    #!/usr/bin/perl --
    use strict;
    use warnings;
    ...
        my $c = $a + $b;
        return $json->encode({ c => $c });
    }
    
  4. or download this
    #!/usr/bin/perl --
    use strict;
    use warnings;
    ...
        my $c = $a + $b;
        return $json->encode({ c => $c });
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-20 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found