{ package SimpleSrv; use parent 'HTTP::Server::Simple::CGI'; sub handle_request { my ($self,$cgi) = @_; print "HTTP/1.1 200\x0D\x0A"; print $cgi->header(-type=>'text/plain'); print "<<<".($cgi->param('POSTDATA')//"undef").">>>\n"; } } my $server = SimpleSrv->new(8080); $server->host('127.0.0.1'); $server->run(); #### $ telnet localhost 8080 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. POST /hello HTTP/1.1 Content-type: text/plain Content-length: 6 foobar HTTP/1.1 200 Content-Type: text/plain; charset=ISO-8859-1 <<>> Connection closed by foreign host.