in reply to Re: Stripping tags from a PerlMonks page.
in thread Stripping tags from a PerlMonks page.

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); }
--
<http://www.dave.org.uk>

European Perl Conference - Sept 22/24 2000, ICA, London
<http://www.yapc.org/Europe/>