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>
In reply to Re: Remove multiple lines between two patterns
by Bloodnok
in thread Remove multiple lines between two patterns
by jcvivar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |