Hello all.
I have a script in a directory called "banners"
I'm trying to read the contents of the directory with a script I
pulled from a book.
I keep getting the sub ErrorMessage text and don't understand why.
Isn't the "." supposed to be for the working directory? ie where the
script resides?
opendir (LOGDIR,".") || &ErrorMessage;
@logfiles = readdir (LOGDIR);
closedir (LOGDIR);
if (@logfiles) {
print "<p>You can choose from the following logs:";
foreach $filename (@logfiles) {
print "<LI>$filename" unless
($filename =~ /^\.+$/);
}
}
sub ErrorMessage {print "sorry no such directory"}
thanks,
-Gene
--
Phone: 303.447.2325