in reply to greater efficiency required (ls, glob, or readdir?)
|| !$_ is possibly unsafe, you would ignore a file named '0'
Also usually 'or' is better than '||' because of lower precedence (doesn't make a difference here though)
In Section
Seekers of Perl Wisdom