This is an excerpt from the latest version perlfaq3.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at
http://faq.perl.org .
--------------------------------------------------------------------
3.20: How can I hide the source for my Perl program?
Delete it. :-) Seriously, there are a number of (mostly unsatisfactory)
solutions with varying levels of "security".
First of all, however, you *can't* take away read permission, because
the source code has to be readable in order to be compiled and
interpreted. (That doesn't mean that a CGI script's source is readable
by people on the web, though--only by people with access to the
filesystem.) So you have to leave the permissions at the socially
friendly 0755 level.