Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Hex String XOR

by Marshall (Monsignor)
on Mar 12, 2012 at 10:39 UTC ( #959104=note: print w/replies, xml ) Need Help??


in reply to Hex String XOR

Glad you have something working to your satisfaction!

Maybe not relevant here, but for future reference, there is a POSIX character class [:print:] that can be used in a Perl regex to emulate the C isprint() function. Throwing "non-printable" control characters to a terminal interface can cause "troubles" to say the least. Basically this character class says whether or not the "printer" can render this ASCII character on the screen.

Replies are listed 'Best First'.
Re^2: Hex String XOR
by JavaFan (Canon) on Mar 12, 2012 at 11:16 UTC
    Or, one could embrace the 21st century and use /\p{Print}/ instead of /[:print:]/. No need to restrict yourself to 256 code points, and subject yourself to locale. The era of 5.005 is over! ;-)
      Your point is well taken, however from the problem statement in this case, it appears that "bytes" are the unit of interest.
        it is wrong method

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://959104]
help
Chatterbox?
[ambrus]: maybe you should join his irc channel or something, unless that causes a flame blowup

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2016-12-09 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (151 votes). Check out past polls.