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

Re: no output from the script

Thread Previous
From:
Agustin Rivera
Date:
April 1, 2002 08:50
Subject:
Re: no output from the script
Message ID:
002f01c1d99c$e47e1bc0$11767f18@retaliator
I find that  

print "Content-type: text/html\n\n"; 

doesnt always work.  So I just use 

print $CGI->header;

Regards,
Agustin Rivera
Webmaster, Pollstar.com / Pollstaronline.com

----- Original Message ----- 
From: "Joe Echavarria" <joe_echavarria@yahoo.com>
To: <beginners@perl.org>
Sent: Monday, April 01, 2002 8:15 AM
Subject: no output from the script


> 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/
> 
> -- 
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org


Thread Previous


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