# The person was trying to return a result set # was doing this. $sth->execute; #his statement handle was $responce %hash = \%($responce); return %hash; #### $sth->execute; my $hash = {}; while(my $row = $sth->fetchrow_hashref()){ $hash->{$row->{'id'}} = $row; } return ($hash);