NEW RANTING:

1. have a link in the browser webpage that points to a pl file.
2. asociate your pl extension with a program you will write (and set the "always run with this program" so it doesnt pop up anymore)
3. clicking on this link creates a detached running of your program, with the pl as parameter (the same way a .doc file opens word)
4. the program runs perl, output into a temporal file with html extension, then runs firefox again with that page... which should open in a new tab/window

Ok, you will need to make a cmd program, then use bat2exe to make it an exe...

OLD RANTING:

Although in the past you could run arbitrary code in Firefox without a plug-in... it was deemed unsave and has been removed. There are some plug-ins that do that for you, but I can not find any at the moment. (and the output was passed as pure text, not re-rendered as html, so you still needed some jquery magic with a refresh to reload that as html)

If you still want to pursue this (without writing a webserver): Flash allows running arbitrary code, but support of it is iffy (and once you know what you can do with it, you never want flash active again when browsing other peoples webpages ;) ). Execute your perl output to a file, and load the result into your page.

And there this

https://en.wikipedia.org/wiki/TiddlyWiki

You can modify the plug-in to run your code, but you will need to modify the java code for it. As of now, it only read/saves.

disclaimer: THIS OPENS BACKDOORS INTO YOUR MACHINE THAT ANYMONE CAN USE!

So the best thing you can do:

Create a CMD/BAT script that you click yourself. And it does execute perl to a static page, then call firefox.exe and gives it that file. If firefox is already open, it will display it in a new tab.


In reply to Re: Execute a Perl script in a browser by FreeBeerReekingMonk
in thread Execute a Perl script in a browser by federico-perlmonks

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.