Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Can someone explain this one to me?

by wog (Curate)
on Jun 16, 2001 at 06:36 UTC ( [id://88996]=note: print w/replies, xml ) Need Help??


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

      cheers

      tachyon

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://88996]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-25 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found