- or download this
use strict;
use warnings;
...
$repl: --ab
old $str: abcd
new $str: --abcd
- or download this
my $str = 'abcd';
my $pattern = shift;
...
$repl: --ab
old $str: abcd
new $str: --abcd
- or download this
my $str = 'abcd';
my $pattern = shift;
...
$repl: --$1
old $str: abcd
new $str: --$1cd
- 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