in reply to Re^2: Test for newline
in thread Test for newline

Interesting, thanks for pointing that out!

I wouldn't recommend using $string =~ "...", though, it's confusing to beginners. Imagine if someone writes "\w" and wonders why it behaves differently than /\w/.