while (my $ref = $sth->fetchrow_hashref ()){ # #warn("generateResponseHash line 587 ref: '$ref'"); hash_display_listing ($ref); ++$count; } $sth->finish (); completeResultHash(%hash_record); #### my $result = $sth->fetchrow_hashref(); my $json_str = encode_json($result); print $json_str; exit(0);