I'm processing a string with embedded newlines. For testing I was storing the text in __DATA__ and slurping it into a string. This works fine. However when I read in a file, I'm having trouble with the line endings. Matching begining/end of logical lines is not working as I expect. Regexes like the one below match when using the DATA filehandle, but don't when opening other text files on my Mac.
$text =~ s/^Text to match.*$//m; Is this due to UNIX '\n' vs. Mac '\r' line endings? I assumed the 'm' modifier would recognize any line ending. Oh what to do? Andrew