in reply to If statements with . and .. filehandles.
This is always true. You probably want:
if ($file ne '.' and $file ne '..'){print "$file\n";} [download]
-- The hell with paco, vote for Erudil! :wq