in reply to Opendir error

Likely opendir didn't open directory for some reason. Add error reporting to find why:
opendir(DIR,"/some_dir") or die "Cannot open directory: $!";
Update: Actually your usage of readdir and <> operator is incorrect. readdir accepts only one argument - directory handle and <> can read only from file handles. Correct code should look like:
#!/usr/bin/perl -w use strict; opendir DIR, '/some_dir' or die "Cannot open directory: $!"; my @files = grep !/^.$/, readdir DIR; closedir DIR;

--
Ilya Martynov, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org