How to get output on the webbrowser ?

Andreas Laufer (laufera@ruf.uni-freiburg.de)
Wed, 01 Jul 1998 18:59:38 +0200


Hi,

I 've got a question about the following script:

#!usr/bin/perl -w
#name: text.pl

use LWP::Simple;
use HTML::Parse;
print parse_html (get 'http://www.servername.com/test.html')->format;


When I start this script from the command line (perl text.pl) I got a
nice ouput with all the textinformations I want.

How can I get the output from the script in a webbrowser when I start it
from the browser like http://my_server/cgi-bin/text.pl


thanks in advance
Andreas


hanks!
jeff

Gisle Aas wrote:

> #!/usr/bin/perl -w
> package MyParser; use base 'HTML::Parser';
>
> sub start {
>    my($self, $tag, $attr) = @_;
>    return if $tag ne 'font';
>    print "FONT SIZE=", $attr->{size}, "\n";
> }
>
> package main;
> MyParser->new->parse(<<EOT)->eof;
>
>    <html>
>    <head><title>Title</title>
>    </head>
>    <body>
>    <h1>I want this heading one</h1>
>    <p>
>    <h2>Heading two</h2>
>    <p>
>    <font size = +1>what about this?</font>
>    </body>
>    </html>
>
> EOT