They probably don't get much smaller than this "one-liner" from the IO::All pod.
I'm not sure how well, or even if it works, but...it comes with a good pedigree.# A single statement web server for static files and cgis too io(":8080") ->accept("-fork") ->( sub { $_[0] < io( -x $1 ? "./$1 |" : $1) if /^GET \/(.*) / } );
In reply to Re: write a small Perl HTTP server
by BrowserUk
in thread write a small Perl HTTP server
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |