in reply to Re: If statements with . and .. filehandles.
in thread If statements with . and .. filehandles.

Correction:
print "$file\n" if $file !~ /\A\.{1,2}\Z/;
Using ^ and $ would also match files named .\n or ..\n.