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 || {} );In reply to Re^7: CGI Action call
by poj
in thread CGI Action call
by tultalk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |