# [PQ][Perl Quiz 2001-02-02 No.0064]

@tmp = @alphabet = map{chr}(0x21 .. 0x7E);
while (@tmp) {
  $tr{$pre = shift @tmp} =
      $post = splice(@tmp, int rand @tmp, 1);
  $tr{$post} = $pre;
}
print <<"EOF";
\$_ = join('', <>);
#tr[@{[join '', @alphabet]}]
tr[\x21-\x7E]
  [@{[quotemeta join '', map $tr{$_}, @alphabet]}];
print;
EOF
