Perl executable showing html in default browser

M

Merijn Boom

Hi,



I would like to know is somebody has experience in showing HTML from a perl
executable in the default browser and let that html interact with the perl
executable via the browser. This is because we would like to convert some of
our perl scripts (ActiveState) via the Activestate compiler in order to have
some stand alone executables.



Any help would be appreciated,



Merijn
 
J

John Bokma

Merijn said:
Hi,

I would like to know is somebody has experience in showing HTML from a
perl executable in the default browser and let that html interact with
the perl executable via the browser.

I guess the only way to do it with a default browser is CGI.
This is because we would like to
convert some of our perl scripts (ActiveState) via the Activestate
compiler in order to have some stand alone executables.

Check out PAR to get a Perl "executable". (It's a file with perl.exe and
all you need in a single file which bootstraps Perl and your script).
 
J

Jürgen Exner

[Also multi-posted to clp. Don't do that, please]
Merijn said:
I would like to know is somebody has experience in showing HTML from
a perl executable in the default browser and let that html interact
with the perl executable via the browser.

Typically people use the Common Gateway Interface for such kind of
applications. You may want to ask in a NG that actually deals with CGI.

If the HTML code is rendered by the browser or shown as text is (among other
things) a matter of the HTTP header. You may want to ask in NG that actually
deals with HTML and HTTP.
This is because we would
like to convert some of our perl scripts (ActiveState) via the
Activestate compiler in order to have some stand alone executables.

The Common Gateway Interface doesn't care if the server side executable is a
script or a compiled program. You may want to ask in a NG that actually
deals with CGI.

Having said that there is one caveat that is actually related to Perl.
Typically Perl compilers didn't have a very good track record in the past,
i.e. people used to have a lot of problems getting their compiled scripts to
run. Now, this may have changed, so please take it with a grain of salt.

Another question is _why_ you want to compile you scripts. If your intention
is to hide you source code then I strongly recommend to read "perldoc -q
hide"

jue
 
J

Joe Smith

Merijn said:
I would like to know is somebody has experience in showing HTML from
a perl


HTML is just text. A perl program can simply use print() statements
to send HTML out whenever it is invoked.
perl executable in the default browser


The server does not cause a brower to run.
The browser is started first, then it contacts the server.
and let that html interact with the perl executable via the browser.


You can't do that with plain HTML.
You could do something like that by sending JavaScript or VBScript,
but not quite. For the most part, the HTTP transaction from
browser to server is already over by the time the server starts
sending a response. Further interaction usually requires initiating
a new connection to the server, which, even if using the same CGI
as before, would be a different process on the server.
This is because we would like to convert some of our perl scripts
(ActiveState) via the Active state compiler in order to have some stand
alone executables.


Non-sequiter. A fully functional perl script can be compiled,
but compiling it does not make it more interactive than before.

-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top