If you don't want specialized modules , you can split on empty lines using $/ and regex-match a <h2> at the start.
You should know how to do it.
Nope, the example input was misleading.
My suggestion is: use an HTML module.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
In reply to Re: Wrapping HTML "sections" with a div
by LanX
in thread Wrapping HTML "sections" with a div
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |