Help for this page

Select Code to Download


  1. or download this
    C:\>perl
    $pattern = "\\";
    ...
    print $variable =~ /$pattern/;
    ^D
    Trailing \ in regex m/\/ at - line 4.
    
  2. or download this
    $variable =~ s/
      (  # start capturing to $1
    ...
    /
    ....
    /x;
    
  3. or download this
      $variable =~ s/((?:\Q$pattern\E)+)/$1.$1.$1/e;
      print $variable;