In your sample input there is no space between 0 and ]. In your regular expression you have the pattern .* ] (there's a space). Did you maybe need to put a /x modifier? Or eliminate that space in the pattern.
Also, this line: my $subst = // is not doing what you think. It is doing a match of $_ =~ // in scalar context and assigning the Boolean result to $subst. I think you probably wanted my $subst = '';, or my $subst = q//;.
Dave
In reply to Re: Substitution don't work
by davido
in thread Substitution don't work
by OldChamp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |