in reply to Re: How to tell if a Directory is Empty
in thread How to tell if a Directory is Empty

IOW, make the regex unless ($file =~ /^\.+\z/)
Why would you change something that's correct, into something that isn't? Be aware that ... is a legal file name, and has not special meaning. And so is ..........

I see nothing wrong the OPs regexp -- except that using a /[.]/ is a performance hit over /\./ in pre-5.10 versions of Perl. But I rather be slow and correct, than fast and incorrect.