A
Addy
Hello,
I have the following code:
$orig = '(original text)';
$subs = '(NEW TEXT)';
$foo = $orig;
$foo =~ s/$orig/$subs/;
print ("$foo\n");
The output is: ((NEW TEXT))
Why is it replacing only what is inside the parentheses, and not all
the text including the parentheses? I'm expecting the output to be:
(NEW TEXT)
What am I overlooking?
Thank you.
I have the following code:
$orig = '(original text)';
$subs = '(NEW TEXT)';
$foo = $orig;
$foo =~ s/$orig/$subs/;
print ("$foo\n");
The output is: ((NEW TEXT))
Why is it replacing only what is inside the parentheses, and not all
the text including the parentheses? I'm expecting the output to be:
(NEW TEXT)
What am I overlooking?
Thank you.