my %hash = ('$1' => 'oops', 'abc' => 'ok'); # create a hash 'abc' =~ m{ (abc) }xms; # capture a sub-string to $1 print qq{captured '$1'}; # show what that string is print $hash{'$1'}; # show effect of single-quotes: no interpolation #### c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le "my %hash = ('$1' => 'oops', 'abc' => 'ok'); dd \%hash; ;; 'abc' =~ m{ (abc) }xms; print qq{captured '$1'}; ;; print 'single-quoted: ', $hash{'$1'}; print 'straight: ', $hash{ $1 }; " { "\$1" => "oops", "abc" => "ok" } captured 'abc' single-quoted: oops straight: ok