Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    $repl: --ab
    old $str: abcd
    new $str: --abcd
    
  2. or download this
    my $str = 'abcd';
    my $pattern = shift;
    ...
    $repl: --ab
    old $str: abcd
    new $str: --abcd
    
  3. or download this
    my $str = 'abcd';
    my $pattern = shift;
    ...
    $repl: --$1
    old $str: abcd
    new $str: --$1cd
    
  4. or download this
    my $str = 'abcd';
    my $pattern = shift;
    ...
    old $str: abcd
    Use of uninitialized value $repl in substitution (s///) at 2perl.pl li
    +ne 42.
    new $str: cd