Re: How to get output on the webbrowser ?
Jimmy Oh (jimmy.oh@icommerce.com.sg)
Thu, 2 Jul 1998 09:42:07 +0800 (SGT)
On Wed, 1 Jul 1998, Andreas Laufer wrote:
> 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
>
>
Hi, I have not used the LWP module before, so I may be missing
something (or even wrong suggestion) with my suggestion. Have you try
sending the appropriate content type before your "print" statement. I
suppose the content type you need is "text/plain". Also, I do not
know whether the first line in your script is a typo or you miss it
out while typing this post: #!usr/bin/perl -w
Hope this helps.
Jimmy
_______________________________________________________________________________
Keep Your Friends Close
Keep Your Enemies Closer
Life is not about what have you done,
It is about what are you going to do.