# Find files in current dir: opendir(FILES,".")
# and print the output to showpics.htm
# Free to use and modify, No rights reserved
# email comments or sugestions to
# author at: eb@2323.us
# Use at own risk.
$a = 0;
open (OUTPUT, ">showpics.htm");
print OUTPUT "";
print OUTPUT "
PicList1";
print OUTPUT '';
print OUTPUT "Page generated by piclist1.pl
";
opendir(FILES,".") || die "Dir not found";
foreach $name (sort readdir(FILES))
{print OUTPUT "
\n";
$a = $a + 1;
}
closedir(FILES);
$b = $a - 2; # minus . and ..
print OUTPUT "Files Found: $b";
print OUTPUT "";
# to change output to a list format, use this code:
# ...
# foreach $name (sort readdir(FILES))
# {print OUTPUT " $name
\n";
# $a = $a + 1;
# }
# ...
#