in reply to Regex does not work across new line character

This isn't a problem with regular expressions. Your code only gets one line of the file at a time when you code your loop like that.
while (<Fil>) { # $_ has the current line from Fil ... }
If you need to search across newline boundaries, then you should either (1) define a different boundary for each chunk to be read with $/, or (2) read the whole thing in as one big string (i.e., using no $/ at all). There are other more complicated methods, but unless we know what you're really trying to accomplish, I wouldn't go into them now.

Then when you use regular expressions, you may want to use the /s modifier as appropriate.

Details in perlvar (for $/) and perlre (for /s).

--
[ e d @ h a l l e y . c c ]