for perl references,
see here
you don't have a perl book? are you sure you don't have a perl book?
anyways, here's how you do it:
opendir (SOME_VAR, "/full/path/to/the/directory");
# you may want to add some check here, to make sure the directory is opened correctly
foreach (readdir SOME_VAR) {
...# this is optional, if you want to skip some files (eg: in unix, if you want to skip . and ..)
...next if ($_ eq "." || $_ eq "..");
...# this display the output ... sure, it's not pretty, but whatever

...printf "filename is $_\n";
}
close SOME_VAR; # when you are done with the directory
-791-
edit: forgot to open directory before reading it ...