| Prev | Perl Notes |
Next |
Once you've opened a directory, you can see which files it contains.
To see what's in a directory:
opendir(LOGDIR, ".") || @ErrorMessage;
@files = readdir (LOGDIR);
closedir(LOGDIR);
if (@files) {
print "You can choose from the following logs:";
foreach $filename (@files) {
print $filename unless ($filename =~ /^\.+$/);
}
}
|
Tips
| Prev | Home | Next |