Embedded Perl Interpreter in a Web Browser
Executing Perl as a Helper Application
Penguin--A New Paradigm in Remote Execution
Parsing Netscape History Files
In this chapter, we're going to take a look at how to use Perl on the client, or browser, side of the Web connection. There are several useful possibilities. As with other chapters, we'll try to focus on the techniques that involve existing Perl5 modules and extensions.
Probably the most interesting (and dangerous) of the possibilities for using Perl on the client side is to use it to process a given URL's contents directly as a script. You can do this in one of two ways. You can associate a given MIME type/extension with the Perl application and have Perl start and process the URL's contents when you receive a URL of this type, or, more interestingly, you can embed the Perl application, possibly as a Netscape plug-in, into the browser and execute the contents of the URL directly, sending the output back to the Netscape window.
Some or all of what follows may be regarded as highly controversial, or even forbidden, from a security standpoint. It's important to emphasize that you can't be too careful when executing arbitrary code, programs, applets, or even macros directly from the Net in any language. Don't hesitate to ask your system administrator if you have any questions or concerns about using any programming language, including Perl, on the client side, especially if you're on a secure or firewalled site. Proceed with caution. Buyer beware! Caveat scriptor! No warranty is implied or given, and so on.