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

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: (regular expressions)

I'm trying to extract a specific block of recurring text from a daily-updated Web page, and output the result to a local file. I'm happy with my HTML retrieval, but then applying regex's on a line-by-line basis requires waaay too much tweeking on my part. How can I substitute across multiple lines? Preferably to the entire file.

Originally posted as a Categorized Question.