in reply to Substitution don't work
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Substitution don't work
by AnomalousMonk (Archbishop) on Aug 24, 2015 at 11:18 UTC | |
|
Re^2: Substitution don't work
by OldChamp (Acolyte) on Aug 24, 2015 at 09:42 UTC | |
by Anonymous Monk on Aug 24, 2015 at 10:08 UTC |