Rather than reinvented the wheel look at something like Perl::Strip.
In reply to Re: Perl script compressor by marto in thread Perl script compressor by harangzsolt33