in reply to Multi-line regex

Please use <CODE> to start your code and </CODE> to end your code postings.

Your regex in question is :

/^\.(\w+).+$\^\t+\.\w+\W+(\w+)/m
This looks like a regular expression that was thought out with a small error and then mangled until Perl would accept it. The ^ and $ special characters in a regular expression do not mean 'start of line' (and 'end of line') in multiline context, but 'start of string' (and 'end of string'). The backslashes before them quote them as literal characters, which is not at all what you are looking for. If you are using the /m multiline mode, you can embed \n newline metacharacters into the string right away :
/(?:^|\n)\.(\w+).+\n\t+\.\w+\W+(\w+)/m
I didn't test this RE, but it looks more like what you described. Here's a breakdown of the RE :
/(?:^|\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
I hope that helps you a bit.