As you can see the output substitutes the string but then adds the :: and everything after it again.No, it doesn't. You asked it to replace the sbo part, and only the sbo part, and that's what s/// did. If you want to replace the entire string, do something like:
instead.$_ = "$newstring\n" if /^$group/;
In reply to Re: How do I escape a :: in s///?
by JavaFan
in thread How do I escape a :: in s///?
by xjlittle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |