in reply to one-line web server

:P (IO::All)

perl -MIO::All -e 'io(":8080")->fork->accept->(sub { $_[0] < io(-x $1 +? "./$1 |" : $1) if /^GET \/(.*) / })'

Unwanted? Yes! Unwarranted? Probably! Unwelcome? Jury nullification works!!!

Replies are listed 'Best First'.
Re^2: one-line web server
by Anonymous Monk on Jun 14, 2016 at 14:03 UTC

    Sorry I don't understand the final comment, I hope is not a bad one!

    Anyway: Can't locate IO/All.pm in @INC (you may need to install the IO::All module)

      The key hint is in the last few words of that error message:

      you may need to install the IO::All module

        They cannot in all situations and they could ask me if I'm dumb to ask installing a module if they know that python one-liner too. I was just looking for something that simple and ubiquitous. They will stick with python, not a big problem after all. Just liked to tell them to use something in Perl.