in reply to Multiple newline regex
Update: here's a fix that reads in paragraph mode. I think this is what you want.
$/=''; while (<DATA>) { print "$1\n" if /(\d)\n\n/; } [download]