Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2015-07-30 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls