Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^7: CGI Action call

by poj (Abbot)
on Mar 13, 2018 at 07:15 UTC ( [id://1210788]=note: print w/replies, xml ) Need Help??


in reply to Re^6: CGI Action call
in thread CGI Action call

hash- or arrayref expected

That's because $result is undefined, ie no records were found so you need to decide how to handle that. You could simply encode an empty hash.

my $json_str = encode_json( $result || {} );
poj

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-29 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found