in reply to Regex does not work across new line character
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.while (<Fil>) { # $_ has the current line from Fil ... }
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 ]
|
|---|