Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Perl XOR

by kennethk (Abbot)
on Sep 18, 2013 at 18:18 UTC ( #1054716=note: print w/replies, xml ) Need Help??


in reply to Perl XOR

What did you try? What worked? What didn't? This is not a code writing service, but we're happy to give pointers and help debug. See How do I post a question effectively?.

You should find some useful guidance with Bitwise Or and Exclusive Or in perlop, sprintf's %x, and hex (or possibly unpack depending on what your input string looks like).


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054716]
help
Chatterbox?
[Discipulus]: always! but if i can ask choroba why you always use the inverted (to me) form 1 == $.?
[choroba]: To avoid accidental overwriting of the variable in if ($x = 3)
[karlgoethebier]: Corion: Auch in hessisch? Mer wasses net.
[Corion]: Hmm - I'm not sure, I haven't read the mundart/slang translations ;)
[Eily]: $F[1] =~ s/^0//r could be written as (0+$F[1]). It's less explicit though
[Discipulus]: ah! seems wise choroba, you play safe
[shmem]: Eily: also -+-$F[1]
[shmem]: hmm... there should be a glyph for "bembel" in unicode "miscellaneous symbols"

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (11)
As of 2017-05-24 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?