Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2016-10-24 07:58 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (303 votes). Check out past polls.