use strict; use warnings; my $hashref = { 1 => 'c' }; print "success" if "success" =~ /$hashref->{1}/;