in reply to Can Perl do this...?

Look into HTTP::Daemon, it saves you lots of time, as it does the basic tcp connection, handles http requests and responses, and even forms the basic http header for you.

One sentence, you can easily use it to make a simple web server.

See , this is perl, one module, fits most of your needs (in this case, almost all of your needs).

(Strike HTTP::Daemon part per jonadab's comment)

Oh, also use CGI module to help you generate the html you send back, if you don't want to worry about html formatting things.

Replies are listed 'Best First'.
Re: Can Perl do this...?
by jonadab (Parson) on Oct 14, 2003 at 13:55 UTC
    Look into HTTP::Daemon

    This would be great advice if he were creating a standalone web-serving app, but he specifically mentions that he's using Apache, so he doesn't need to handle any HTTP stuff at all, just take the input Apache gives him and print content.


    $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/