in reply to Execute a Perl script in a browser

You can run the web server locally on your computer. For example, see HTTP::Server::Simple.

To try a more modern way, have a look at Dancer:

perl -MDancer -e 'get "/" => sub { "Hello world" }; dance' >> Dancer 1.3202 server 15071 listening on http://0.0.0.0:3000 == Entering the development dance floor ...

Then just point the browser to the indicated address.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Execute a Perl script in a browser
by FreeBeerReekingMonk (Deacon) on Apr 21, 2016 at 07:40 UTC
Re^2: Execute a Perl script in a browser
by federico-perlmonks (Novice) on Apr 21, 2016 at 14:50 UTC

    I took a look at dancer and HTTP::Server::Simple. Tell me if I am wrong, but I think when I use Dancer I still have to launch the script from the command line and then use the browser to connect to the address told by Dancer, right?
    HTTP::Server::Simple may be too complex to me... but if I will not find a simpler solution, I will try it.

      Yes, you have to start the server. But you only need to start it once, you can then query it many times. You might need to restart it when the code changes, though.
      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

        All right, thank you very much.