sub find_point(){ my $ref = shift; my %hash = %$ref; my $key = shift; if(exists($hash{$key})){ ... } }