in reply to Remove multiple lines between two patterns

The 'usual' way of achieving this is to use the flip flop operator (or range operator).
use 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>
Giving
$ perl tst.pl <html> <head> </head> <body> </body> </html>
A user level that continues to overstate my experience :-))