in reply to Remove multiple lines between two patterns
Givinguse warnings; use strict; use autodie; while (<DATA>) { next if (/<!--/ .. /-->/); print; } __DATA__ <html> <head> <!-- some html comment --> </head> <body> <!-- some multi-line html comment --> </body> </html>
$ perl tst.pl <html> <head> </head> <body> </body> </html>
|
|---|