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

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,
what free webhosting with Perl/CGI support would you suggest? The purpose is just learning Perl/CGI by doing. Ad banner would be therefore no problem.
Thanks!

Replies are listed 'Best First'.
Re: Webhosting with Perl/CGI
by Your Mother (Archbishop) on Jun 07, 2012 at 14:30 UTC

    What ww said, though you don't even need a "real" webserver at this point.

    File hai.cgi

    #!/usr/bin/env perl use strictures; use CGI qw(:standard); print header(), start_html("OHAI"), h1("HAI DER"), blockquote("I CAN HAZ SEE GEE AIEE?"), p("KTHXBAI!"), end_html();

    Command line-

    moo@cow[201]~>plackup -L Shotgun -p 8080 -MPlack::App::WrapCGI -e 'Pla +ck::App::WrapCGI->new(script => "/home/moo/hai.cgi")' # HTTP::Server::PSGI: Accepting connections at http://0:8080/

    Then visit your CGI at something like http://localhost:8080 depending on your box.

    Helpful reading

Re: Webhosting with Perl/CGI
by ww (Archbishop) on Jun 07, 2012 at 13:23 UTC
    If learning is the sole point, it would make more sense to me (YMMV) to install Apache or another widely used server on your own machine... as you'll likely need to know at least a bit about common Apache configurations to deal with some of their ticks and quirks (aka "invented here" which varies from provider to provider).

    That said, you can find numerous answers to very similar questions by using Google against PerlMonks or by using our own Super Search. Failure to do so may be read as lack of effort on your part.

Re: Webhosting with Perl/CGI
by RedElk (Hermit) on Jun 07, 2012 at 14:08 UTC

    This link was helpful for me.

Re: Webhosting with Perl/CGI
by Anonymous Monk on Jun 08, 2012 at 08:08 UTC
    Thank you all!
    Have installed XAMPP (portable) for Win32 now. (I am afraid that the Plack is a mental overload for me :-( )
    XAMPP has a "Mini-Perl" however, i.e. without any modules.
    Is it possible to "exchange" Mini-Perl to a real Perl installation (or to link XAMPP to my installed ActivePerl)?
    Thanks!
        Thank you, this was really helpful!
        First, after changing the shebang I could use my installed ActivePerl.
        Second, it appears that only Lite version of XAMPP comes with miniPerl, the "real" one comes with Perl 5.10 with a lot of modules and with ppm etc. to install some other ones.
      Actually, you don't need to know anything about Plack or read all the documentation. Just install the modules YourMother has listed and use the command as shown, just replace the path with the path to your cgi script. Should be all you need.
      My XAMPP experience is limited to Windows so ... In your cgi script put the location of the perl you wish to use on the shebang line.