ArmandoG has asked for the wisdom of the Perl Monks concerning the following question:
this script calls a cgi script call "download.cgi" can I do that? and can you take a look at the code for errors thanksuse strict; use CGI; my $list = new CGI; my $fileDir = "c:/files/err"; my @files; opendir DIR, "$fileDir" or die "Can't open $fileDir $!"; @files = grep { /\.(?:txt|zip|jpg|mp3|err|csv)$/i } readdir DIR; closedir DIR; print $list->header("text/html"), $list->start_html("Archivos in $fileDir"), $list->p("Estos son los archivos de $fileDir"); foreach my $file (@files) { # print $list->p($list->a({-href=>$fileDir."/".$file},$file) print $list->p($list->a({-href=>"/cgi-bin/download.cgi?ID=$file">" +$file"}) #"/archive/".$file},$file) ); } print $list->end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can I call a CGI from another CGI?
by eserte (Deacon) on Dec 27, 2007 at 23:54 UTC | |
|
Re: Can I call a CGI from another CGI?
by bradcathey (Prior) on Dec 28, 2007 at 01:24 UTC | |
|
Re: Can I call a CGI from another CGI?
by NetWallah (Canon) on Dec 28, 2007 at 04:13 UTC |