See Re: Here is a commercial obfuscator. That's the right idea anyway. Remove the rest of the whitespace to taste. What you *don't* want to do is use a source filter since nothing parses perl except the interpreter. You could look at some of the other examples in Acme:: like Acme::Bleach or Acme::Buffy.