There's more than one way to do things | |
PerlMonks |
Re: Substitution don't work with a special inputfileby Eily (Monsignor) |
on Aug 24, 2015 at 12:51 UTC ( [id://1139673]=note: print w/replies, xml ) | Need Help?? |
Your second file seems to have line breaks ("\n") in the middle of the {[%tqu...]} strings, and the dot does not match this character unless you use the /s modifier. Try s/$regex/$subst/sgi; instead Edit: except .* with /s will be far too greedy. [^]]* or .*? would work better
In Section
Seekers of Perl Wisdom
|
|