in reply to Trying to parse html file

perlfaq6 "How can I pull out lines between two patterns that are themselves on different lines?"

use the .. operator /START/ .. /END/

I used it to pull out data in numerous places across multiple lines between two patterns in a similar way to what you are indicating.

caveat: I'm very new at perl - there may be much better ways of doing it as outlined above; I'm just very simplistic in my approach and this was a simple solution. I also could have misunderstood what you are asking.