11
Is it possible to replace parts of a string without having to create a whole new variable?
Right now I do it like this:
$someString = "how do you do this";
$someString = s/how do/this is how/;
What I am trying to do is keep the original string ($someString) and be able to substitute a few characters without modifying the original string. Im more familiar with Javascript and I can do it like this in your code without having to create/modify a variable.
someString.replace(/how do/, "this is how")
Any help is appreciated, thanks alot