The FAQ seems to make a brief case, and then retire, perhaps because this question is difficult to answer with confidence.

If you're willing to handle a little uncertainty, and to do a bit more testing with the "secret" version of your program to make sure things are working according to spec, you could use perlcc, the Perl-C compiler. While not 100% complete, seems to work on most of the stuff that I've thrown at it. It also seems to be the most practical, as the Perl-JVM compiler, and Perl6 and such are not done yet. Remember, though, that compiled scripts must be re-compiled for each and every platform that they are to be run on. If you're considering commercial sales of this program, that list can be pretty darned long: Linux (libc6, glibc2, RedHat 7), BSD, Solaris(Sparc,Intel), Windows, etc. You will have to recompile, and test, on each of these.

The "old fashioned" way of achieving same (i.e. "binary code" version of Perl script) was to force Perl to dump() a 'core' and convert the 'core' into an executable using GNU unexec. See the dump() link for more info. Of course, as that page says, this may not actually work (at all).

A while back I came across a company that had ported their "source protector" to work on Perl. What it basically did was mangle variables, function names, and the like, into line-noise-type random characters to try and obfuscate the code automatically. It was still code, though, so it wouldn't prevent anyone really determined to read it from doing so. I other words, it prevented casual reading, but wasn't an obstacle to serious efforts.

In reply to Re: seeking the root of all evil (or the sum?) by tadman
in thread seeking the root of all evil (or the sum?) by $CBAS

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.