#!/usr/bin/perl -w # encode.pl - Don Yang (uguu.org) # # Despite existence of superior compression libraries, Zlib is still # the most widely available package. # # 11/03/12 use strict; use Compress::Zlib; my $input = join '', <>; my $encoded = pack 'u', compress($input); $encoded =~ s/\s//sg; my $shifted = join '', map {chr($_ + 25)} unpack 'C*', $encoded; print $shifted; print "\n";