develooper Front page | perl.beginners | Postings from April 2002

no output from the script

Thread Next
From:
Joe Echavarria
Date:
April 1, 2002 08:15
Subject:
no output from the script
Message ID:
20020401161507.2595.qmail@web10806.mail.yahoo.com
Hi there,

  When i try to execute the script using the web
browser i get no output from it but at shell prompt it
works.

Here is the script :

#!/usr/bin/perl -w
use CGI qw/:all/;
print "Content-type: text/html\n\n";
print "<title>- LISTA DE LINKS -</title>";
open(LISTA,"links") or die "Error ---- > : $!\n";
open(CATEGORIAS,"categorias") or die "Error ---- > :
$!\n";
print "<B>Lista de Categorias </B><BR><BR>";
print "<form name=\"miforma\" method=\"post\"
action=\"./links1.cgi\" >";
print "<select name=\"categorias\" size=\"1\">";
while ($file1 = <CATEGORIAS>) {
   ($no,$desc)=split(":",$file1);
   print "<option value=\"$no\">$no</option>";
}
close(CATEGORIAS);
print "</select><Input type=\"submit\" value=\"GO\">";
print "<table border=5 cellpadding=5><caption><B>LISTA
DE LINKS
</B></caption><tr><th>TEMA</th><th>LINK</th></tr>";
if (param('categorias'))
  {
     $cate= param('categorias');
     while ($file = <LISTA>) {
             ($categoria,$link) = split(":",$file);
             if ($categoria eq $cate) {
               print "<tr><td>
$categoria</td><td>$link</td></tr>";
 }
}
}
print "</table></form>";



__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About