Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Hex String XOR

by Marshall (Prior)
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.


Comment on Re: Hex String XOR
Download Code
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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (16)
As of 2014-07-22 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (117 votes), past polls