in reply to Can someone explain this one to me?

Although the other answers appear to explain the way this works they ignore one other trick going on here. The ASCII characters between 0 and > inclusive are 0 1 2 3 4 5 6 7 8 9 : ; < = and >. You'll notice that the > character was used in the example code, and not the = charactor, though if you do a one-to-one mapping it looks like = should have been used, and > would be left over. The reason the could given still works is another bit of magic -- when tr's replacement list is shorter then its source list it duplicates the last item of the replacement list to match, thus the Y at the end correspondes to both = and >. Except with some /something options: see perlop for more information, of course.

Replies are listed 'Best First'.
Re: Re: Can someone explain this one to me?
by Cody Pendant (Prior) on Jun 17, 2001 at 05:21 UTC
    Thanks a lot for that everyone, that's certainly taught me something about tr// that I didn't know. The only way I knew how to obfuscate it was to do a y// instead...

      For the best obfu using tr I have ever seen see Line Noise