howdthattaste
Programmer
hello
is there a way to do multiple string replacements in one line?
sentence:
"The dog ran into the dog store."
rule: Always replace 'dog' with 'cat' and always replace 'store' with 'shop'
my guess:
$string =~ s/dog/cat/store/shop/g;
something like that... I guess, if its possible, im looking for the syntax, maybe some paraenthesis?
is there a way to do multiple string replacements in one line?
sentence:
"The dog ran into the dog store."
rule: Always replace 'dog' with 'cat' and always replace 'store' with 'shop'
my guess:
$string =~ s/dog/cat/store/shop/g;
something like that... I guess, if its possible, im looking for the syntax, maybe some paraenthesis?