Perl: the Markov chain saw | |
PerlMonks |
Re^7: CGI Action callby poj (Abbot) |
on Mar 13, 2018 at 07:15 UTC ( [id://1210788]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|