http://www.perlmonks.org?node_id=1180944


in reply to Re^2: appending to html at beginning
in thread appending to html at beginning

I get 500 internal server error - because I guess the code isnt totally "right" ?

yes you cannot put use strict; use warnings; bare statements without modifying your code. You need to declare all variables you use using my like in my $var = "foo";

Blindly develop on webserver is, in my experience, a frustrting operation: everything you get wrong you got a 500 error.

if you want to learn about Modern Perl Web you can start with perldancer.org and it's module Dancer2 it is pretty easy to use.

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^4: appending to html at beginning
by haukex (Archbishop) on Feb 03, 2017 at 09:46 UTC

    Hi Discipulus,

    Blindly develop on webserver is, in my experience, a frustrting operation: everything you get wrong you got a 500 error.

    use CGI::Carp qw/fatalsToBrowser/; can help with that. Although I would only recommend it in a development, not production, environment, since it can potentially reveal details about the script or server to an attacker.

    Regards,
    -- Hauke D