... or, one of several possible alternates, on the off chance (ymmv) you find this will be easier to read someday, down the road:
my $regex = qr'(?:\[.*?\])'; compile regex; use non-capture grouping $str =~ s/$regex/~~/g;
In reply to Re: Advanced replace function
by ww
in thread Advanced replace function
by sans-clue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |