in reply to pattern matching

If your start marker and your end marker are always on separate lines (which isn't always a good assumption or design for HTML-alikes), then the flip-flop can be useful:
while (<>) { push(@array, $_) if /one/ .. /two/; do_something() if /two/; }

--
[ e d @ h a l l e y . c c ]