Help for this page

Select Code to Download


  1. or download this
    $ perl -wle'use strict; my $str2 = "@cce$$ag@!n"; print $str2;'
    Global symbol "@cce" requires explicit package name at -e line 1.
    ...
    
    $ perl -wle'use strict; my $str2 = "\@cce\$\$ag\@!n"; print $str2;'
    @cce$$ag@!n
    
  2. or download this
    my $str1_pat = quotemeta($str1);
    $str1 =~ s/$str1_pat/$str2/;
    ...
      - or -
    
    $str1 =~ s/\Q$str1\E/$str2/;   # Same thing.