Hi,
If I have something like
$var="abcd";
How can I make a substitution to the contents of $var and display the substituted output without making any changes to the actual contents of $var.
So in the above example, I want to keep the contents of $var the same, but in a print statement, I want to display the contents of $var but substitute the letter d for something else.
I was hoping you could do something like
print(s/d/newstring/$var);
But that doesn't work.
Any help much appreciated.