Parsing HTML using regular expressions is always a dangerous affair - especially if you have no control over the HTML content - but if you were going to use this approach you could simplify it by using the '..' operator.
--while (<>) { next if /line to skip/; print unless ($startline .. $endline) or (/skip start line/ .. /skip end line); }
In reply to RE: Re: Stripping tags from a PerlMonks page.
by davorg
in thread Stripping tags from a PerlMonks page.
by dmtelf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |