#!/usr/bin/perl -w use strict; my %hash = qw( foo 1 bar 1 baz 1 ); my $ref = \$hash{bar}; my ($key) = grep { \$hash{$_} eq $ref } keys %hash; print "$key\n"; # or my %ref_hash = map { \$hash{$_}, $_ } keys %hash; print $ref_hash{$ref};