in reply to Substitution backreference woes
With my $substitution = 'Goodbye \1'; which is obviously not a regex, which regex "group" are you back-referring to?
Check this however:
my $string = "Hello sailor"; my $regex = qr/Hello (.*)/; $string =~ s/$regex/Goodbye \1/; print "string is now $string \n";
|
|---|