in reply to Multiple newline regex

By default, you're reading only one line at a time, so you'll never match something across two lines.

Simply prepend your code with

$/=""; # slurp data in paragraph mode, see perlvar for more info
and you'll be able to use your existing code "unaltered".

You can do a chock full of interesting things with $/. Take a gander at perlvar and play with the different ways you can read data.

Cheers!
-v
"Perl. There is no substitute."