in reply to Extracting text between HTML comments tags

my @matches = $html =~ m/<!--BEGIN -->(.*?)<!--END -->/gs;
this allows you to have several such tags in one html string.
if you have just one you can speed this up by dropping the /g and the ? from .*?
for details please read perlre, perlretut and similar perldocs.