use Data::Dumper; my %myhash; $myhash{REGEXP} = qr/^something$/; print Dumper \%myhash; __END__ $VAR1 = { 'REGEXP' => qr/(?-xism:^something$)/ };