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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |