CGI perl links to files in Dir
I'm in the middle of writing my first perl script.(had to happen sometime)
So far when i click submit the script makes an HTML page that has the same look as the rest of the pages on my site.
and thats pretty swell. Now i need to read the contents of a DIR
and make a link to each file in that DIR. I've been trying to implement
readdir(), but not having much luck. I will gladly affero pay someone for helping me out with this as soon as I get paid for the job.
this is the relevant part of the script so far:
return if($_ =~ /^\./);
return unless($_ =~ /\$filetype/i);
return if -d;
return unless -r;
opendir(DIR, $scandir) or return;
my $file_name = $1;
print "<li><a href=\"$File::Find::name\">$file_name</a></li>\n";
$filetype is defined by a popup in the form (and working properly)
$scandir is defined at the head of the script
thanks alot(and yes i do know that i'm a hack)
Last edited by ocularbob; 04-28-2003 at 09:10 AM.