#!/usr/local/bin/perl -w opendir(DIR,".") || die "couldn't open the directory!"; @files = readdir(DIR); closedir(DIR); print 'There are ',scalar(@files)," files in the directory.\n"; foreach $file (@files) { print "Stored on the server as: $file\n"; print "--------------------------------------------\n"; open (CURRENT, "$file") || die "couldn't open the file!"; while ($fileguts = ) { print " $fileguts"; } print "\n\n\n"; close(CURRENT); }