Now the easiest, and the most dangerous, way to implement this is with the simple entry in your .mailcap:
application/Perl; /usr/local/bin/Perl %s
And in your .mime.types:
type=application/Perl\ desc="Ordinary Perl script" \ exts="myplt"
Figure 15.2.
The perl-opengl plugin page.
These will map any URL with the .myplt extension to be executed automatically with Perl. Now that we've told you how to do it, we emphasize that you should never, ever do this, under any circumstances. Even using the special extension, .myplt, if anyone ever learns that you've set this up, they might be able to send you a script that could compromise your security in the guise of an innocuous-looking URL. Fortunately, Netscape nowadays has the built-in warning dialog, which prompts you before actually executing the script.
In any case, it's much better to use the Safe extension to set up a secure environment first, then execute the script within this environment. Listing 15.1 shows a simple script called HelperAppPerl that you can install and then set up your .mime.types and .mailcap files to invoke it with the Perl script you've downloaded.