in reply to Filenames named "..\n"

I either write the test as:
grep {!/^\./}
if I want to ignore all file (and directories) that start with a dot (like ls without the -a or -A option), or write it as
grep {$_ ne "." && $_ ne ".."}
which is a lot clearer than /^\.\.?\z/. It's longer, but anyone immediately sees you are excluding two names, and two names only.