When using regexes, it's safest to use quotemeta — failure to do so may be the cause of why it didn't work for you:
s/\Q$cut/$replace/;
In reply to Re: binary search/replace
by bart
in thread binary search/replace
by momo33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |