in reply to hide perl script

As ikegami has explained, if your server is returning your source code, that means your server is misconfigured.

However, there are legitimate reasons for wanting to prevent your users from reading your proprietary Perl code.

For this, I would recommend taking a look at Filter::Crypto module on CPAN.

Do note that once someone obtains the source code, there is really nothing you can do to completely prevent them from decrypting it:

In general, it is hopeless to try to prevent everyone from getting at the source code, especially when it is being run in an environment that you have no control over, and even more so when the software running it (Perl) is open source itself.

This technique can never completely hide the original unencrypted source code from people sufficiently determined to get it. The most it can hope for is to hide it from casual prying eyes, and to outdo everyone who is using a precompiled perl (at least from "regular" sources) and everyone who is not knowledgeable enough to suitably modify the Perl source code before compiling their own.

Best,

Jim