#!/usr/bin/perl -w use strict; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); my $EX_DIR = "/media/EXTERNAL"; sub displayHardDriveFiles () { opendir( DIR, $EX_DIR ) || die "

Cannot open $EX_DIR: $!

\n"; print < Files on this harddrive HTML foreach my $d (sort readdir(DIR)) { print "$d\n"; } print < HTML } print header; print start_html ("Welcome"); displayHardDriveFiles(); print end_html; #### Software error:

Cannot open /media/EXTERNAL: Permission denied

For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.