There's more than one way to do things | |
PerlMonks |
Re^3: Perl RE; how to capture, and replace based on a block?by hdb (Monsignor) |
on Dec 18, 2013 at 07:29 UTC ( [id://1067600]=note: print w/replies, xml ) | Need Help?? |
Hi Chris, specifying a regex on the command line seems a difficult thing to do. At least you should be printing your $regexp to see what it contains. In any case, this code seems to work:
which suggests that if you slurp in your whole file as a single string (e.g. by unsetting $/), your regex should do its job.
In Section
Seekers of Perl Wisdom
|
|