in reply to How do I read all the file names of a directory into an array?

Working off of the array of file names, this is how I created a link to the file.
#!/usr/bin/perl print "Content-type: text/html\n\n"; opendir(INFILE, "dir.dat") || die ("Unable to open directory"); #this line gets rid of . and ..<br> @files = grep !/^\./, readdir(INFILE); closedir(INFILE); foreach $file (sort @files) { print ("<font size=\"2\"face=\"arial\"><a href=/owner/$file>$ +file</a></font>\n<br>"); }

peppiv
  • Comment on Re: How do I read all the file names of a directory into an array?
  • Download Code