Help for this page

Select Code to Download


  1. or download this
    my $pat = quotemeta($delim);
    s/$pat/\\$delim/g;
    
  2. or download this
    s/\Q$delim\E/\\$delim/g;
    
  3. or download this
    s/\Q$delim/\\$delim/g;     # \E is optional at the end of the literal.