http://www.perlmonks.org?node_id=53832


in reply to How would I find a piece of html from a sourcefile.html?

This regular expression will grap the entire tag, brackets and all.
$data =~ m/(<[^>]+>)/; print $1, "\n"; # print the tag
This regex will leave out the brackets and print only the string inside them:
$data =~ m/<([^>]+)>/; print $1, "\n"; # print the tag
Use modifiers, or loops as you need too. -kel