http://www.perlmonks.org?node_id=196561

chunlou has asked for the wisdom of the Perl Monks concerning the following question: (gui programming)

Is it possible to write a standalone GUI in HTML/DHTML (i.e. just using web browser, no web server) to execute Perl scripts?

For example, have a web page with a bunch of links to my Perl scripts, which I can click and execute, and see the script's output in the browser, without resorting to web server and CGI. Rather like a standalone browser-based shell.

It seems easier to me to write a GUI in HTML than Tk, plus you get CSS stylability and all that.

Originally posted as a Categorized Question.

Replies are listed 'Best First'.
Re: How to write standalone HTML GUI?
by grantm (Parson) on Sep 10, 2002 at 09:41 UTC

    If you install ActivePerl on windows, you can use PerlScript in IE from <script> tags in static HTML pages the same way you use JavaScript (or VB Script). Not cross platform and IE only.

    Another option would be to use Perl as a web server. Check out HTTP::Daemon for one example.

    Re: How to write standalone HTML GUI?
    by dimar (Curate) on Nov 13, 2004 at 04:18 UTC

      Related to the previous answer: you can make HTML Applications (HTA) with ActiveState PerlScript. An HTML Application is an HTML page which runs in the same security context as an 'exe' file.

      <script language="perlscript"> ## perl goes here </script>

      Again, this is not cross platform and is IE only.

      Also see the Perl-Win32-ASP FAQ

    Re: How to write standalone HTML GUI?
    by igoryonya (Pilgrim) on Dec 05, 2009 at 13:21 UTC
      You could use Mozilla XUL, which is HTML(XML)/JavaScript User Interface. I am not sure if it works in conjunction with perl, since, I've several times started learning XUL, but every time got distracted by other problems in life. ...but it will only work in browsers, based on Gecko engine, unless something has changed since then.
    Re: How to write standalone HTML GUI?
    by Anonymous Monk on Apr 09, 2003 at 14:37 UTC

      Re: How to write standalone HTML GUI?

      Originally posted as a Categorized Answer.

    Re: How to write standalone HTML GUI?
    by exn (Novice) on Apr 11, 2009 at 12:47 UTC
      
      >Is it possible to write a standalone GUI in 
      >HTML/DHTML (i.e. just using web browser, no web 
      >server) to execute Perl scripts? 
      
      
      Very interesting question. I want this for linux !
       like gtk2 but gui on clear html with tables, css, 
      images...  
      
      

      Originally posted as a Categorized Answer.