Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,

I have a perl tk program that I would love to be able to call
from a CGI script. I have a web database and some of its data needs to
be opened in my own customised perl tk GUI.

The first thing Im unsure of is, can a cgi FORM point to a perl program
or must it always point to a cgi ? (ie. using post or get)
I have been trying system calls like this:
system("perl my_program.pl") or die "System error";
having changed permissions on my perl tk program to 0777.

Anyway, my system call doesnt work :(
I was wondering if it would be possible to make my perl tk program
into some sort of plug-in viewer ?
Any help would be great

cheers m'dears

Replies are listed 'Best First'.
Re: Call Perl Tk program from CGI/making plugins ?
by tall_man (Parson) on Feb 19, 2003 at 19:22 UTC
    I'll put in another plug for perlplusplugin, though I seem to be the only one around here who has tried it. It can be used to bring up perl/Tk windows from a browser, and even embed them in the browser window (on Linux).
      thats great, thanx tall_man.
      Loads of us in my computer room do perl tk and noone knew about the plugin !
Re: Call Perl Tk program from CGI/making plugins ?
by jasonk (Parson) on Feb 19, 2003 at 17:51 UTC

    You can configure your web server to consider .pl scripts to be CGI's, but the answer is basically no. To be able to run your perl script as a plugin you would have to install perl and some sort of perl browser plugin on the client machine, you can't just run a Tk program from a CGI and expect it to display in the browser.