in reply to UPDATE :: finding a file exist amongst many files

Here is perl doc for glob. Readdir is as stevieb points out is also an option. note that bsd_glob see File::Glob has slightly different rules than the built-in glob.
my @perl = <*.pl>; print scalar @perl;
Would print number of .pl files in current directory.