Oo, nice! And with inspiration once again from btrott's substitution approach:
sub canonical { ($_,$a,%h)=@_;s/./substr"a$a",$h{$&}||=keys%h,1/gse;$_ }
Back down to 54!

In reply to Re: Re: Re: (Golf) Cryptographer's Tool #1 by chipmunk
in thread (Golf) Cryptographer's Tool #1 by Masem

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