How to display PERL coding "Results" on webpages?

Jonathan Stowe jns at
Tue Jun 12 07:17:56 PDT 2007

On Tue, 2007-06-12 at 13:10 +0000, Ravi Patel wrote:
> Guy's,
> How to display PERL coding "Results" on webpages? What I'm trying to
> do is to display the result of the following PERL code on to a webpage
> and its not working. What can I do?

You are not send any headers - at the very least you have to send a
Content-Type: header followed by two newlines before any other content.
As demonstrated by the  example I gave for your previous question, you
can achieve this by inserting:

        use CGI ':standard';
        print header();

after the "use warnings;"

You probably want to read the documentation for the CGI manual as well
as the specification for the CGI:

> Please see attachment.

Sending attachments (and HTML and so forth) to mailling lists is not
ideal as some software will remove them - for small snippets such as
this you are better off putting it in the body of the message.

More information about the MiltonKeynes-pm mailing list