in reply to Multi-line regex

Besides the above comment, I also didn't see anything even in your mangled code that reads the file. Must have that. And if you expect more than one line to be scanned by a regex, you have to read a bunch of lines:
open FOO, "somewhere" or die "cannot open somewhere: $!"; $_ = join "", <FOO>; if (/ (?:^|\n) # Start matching either at the start of the string # or at a newline. The ?: part means, that # the parentheses I use don't get saved in $1 \.(\w+).+\n # match a line starting with a dot-word and some # more stuff \t+\.\w+ # The line after this must start with at least one # tab and then a dot-word \W+(\w+) # and contain some other stuff as well ... /mx ) { ... you found one ... }
Something like that.

-- Randal L. Schwartz, Perl hacker