Help for this page

Select Code to Download


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