in reply to Re: Non-CGI perl scripts on a web server?
in thread Non-CGI perl scripts on a web server?

The other way to out put a header would be:

use CGI; my $header = new CGI; print $header->header();

I hope this helps

Replies are listed 'Best First'.
Re^3: Non-CGI perl scripts on a web server?
by Your Mother (Archbishop) on Feb 24, 2015 at 01:25 UTC

    And at least a few more ways of which I don’t doubt mr_mischief was aware. :P

    ~>perl -MCGI -e 'print CGI->header' Content-Type: text/html ~>perl -MCGI -e 'print CGI->header("text/plain")' Content-Type: text/plain ~>perl -MCGI=:standard -e 'print header("text/plain; charset=UTF-8")' Content-Type: text/plain; charset=UTF-8

    (Update: chopped p rint fixed.)

Re^3: Non-CGI perl scripts on a web server?
by mr_mischief (Monsignor) on Feb 24, 2015 at 17:39 UTC

    I don't recall anyone asking nor answering about alternative ways to output headers. The question I answered was about alternate values for the header.