my %dereferenced_hash = %{$hash_reference}; # of course, you can also access elements via the ref directly: print "yeah\n" if exists $$hashref{'key2'}; # or even print "insufficient\n" unless $hashref->{'balance'} > $request;