sub print { my $self = shift; my ($hashref) = @_; # print the reference address: print $hashref; # dereference the hashref and print the content: print %{$hashref}; } #### $r->print( %{ 'response' => {'result' => $results,}, }); #### my %real_hash = ( 'response' => {'result' => $results} ); # Passing the reference of a real hash $r->print( \%real_hash );