http://qs1969.pair.com?node_id=11138116

blackjackstory.com has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: cgi HTML head error
by choroba (Cardinal) on Oct 27, 2021 at 19:01 UTC
    Please, try to format your post better. It seems you know how HTML works so it shouldn't be a problem. Also, please remove links to your provider's support channels.

    What webserver do you use?

    Where does your Perl look for modules? Is CGI installed there? It's not a core module any longer.

    What bug in 5.26.3 are you talking about?

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      A missing CGI.pm could indeed be a pitfall when upgrading from Perl 5.10 to Perl 5.26 - but the code snippet doesn't even use it... So I rather guess it's something more fundamental: a bad web server configuration, or Perl installed in a non-standard location, or file permissions - hard to guess without seeing the config.

Re: cgi HTML head error
by haj (Vicar) on Oct 27, 2021 at 18:56 UTC
    The error message indicates that your Perl program hasn't even started. The code snippet doesn't behave any different between Perl versions 5.10 and 5.34. The problem is in the server configuration, not in Perl - so that's to debug between your virtual server configuration and your provider. Sorry.
Re: cgi HTML head error
by perlfan (Vicar) on Oct 27, 2021 at 23:07 UTC
    On a shared host where you have a cgi-bin directory, start off with a simple script. It doesn't even need to be Perl - it could be anything that prints to STDOUT and is executable.

    The minimal response from any of these programs is this,

    Status: 200 Content-type: text/html <!doctype html> <html> HTML Goes Here </html>

    See https://www.perl.com/article/perl-and-cgi/. I also recommend checking out CGI::Tiny. If you're on a shared host that's "powered" by cPanel/WHM, then you can likely install Perl modules locally via the cPanel interface (ask your host if you don't know). There's also cpanm coupled with local::lib.