in reply to Dereference inside a regex
The following works for me:
use strict; use warnings; my $hashref = { 1 => 'c' }; print "success" if "success" =~ /$hashref->{1}/; [download]