You're not checking whether the response is an HTTP success...
my $req = POST( "http://myurl/public_html/cgi-bin/json-addition.cgi", Content_Type => 'application/json', Content => $json->encode($data), ); my $response = $ua->request($req); $response->is_success or die($response->status_line); my $result = $json->decode($response->decoded_content); print $result->{c}, "\n";
In reply to Re: json return value
by tobyink
in thread json return value
by stenasc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |