http://www.perlmonks.org?node_id=344474


in reply to newline behavior in Regular Expression

Congrats. I didn't even know that IE would honor <font size="+10"> but you proved it. I should print this question out as a poster for my bare wall here.

The $ means end-of-line, not end-of-string. The end of line is true just before any trailing newline character. So if $X had a newline before, it won't replace the newline after. One preventative measure would be to use chomp($X) beforehand.

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