#!perl -w use strict; sub encode_decode ($) { my $txt = shift; my $key = 'Copyright © 2000 ActiveState Tool Corp.' x length $txt; my $enc = $txt ^ substr $key, 0, length $txt; return wantarray ? unpack "C*", $enc : $enc; } undef $/; my @encoded_ascii = encode_decode ; # one or other #my $encoded_string = ~~encode_decode ; # of these two __DATA__ #!"#$%&'()*+,-./0123456789:;<=>?@ #ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` #abcdefghijklmnopqrstuvwxyz{|}~ #!"#$%&'()*+,-./0123456789:;<=>?@ #ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` #abcdefghijklmnopqrstuvwxyz{|}~ #!"#$%&'()*+,-./0123456789:;<=>?@ #ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` #abcdefghijklmnopqrstuvwxyz{|}~ print "Show me the encoding!\n";