choroba is always right. Here's more to consider–
use v5.14; { local $_ = "He's out bowling with Fred tonight."; s/Fred/Barney/; s/with (\w+)/against \U$1\E's team/; say; }
local and a scope block to protect $_. \U\E to uppercase and end. You could also do raw Perl in the right side of the s///e if you include the e for execute flag. say by itself because $_ is implied.
In reply to Re: Having issues with substitutions
by Your Mother
in thread Having issues with substitutions
by catfish1116
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |