in reply to Filenames named "..\n"

I just ran across this very issue in Programming Perl, where it says:

"...(Yes, using a newline as a file extension Isn't Very Nice, but that doesn't mean it can't happen)."

It seems likely that someone, somewhere, either got bored or wanted to make a little mischief, and created a filename as described. It only takes one, to break your code if you don't allow for it...