Just another Perl shrine | |
PerlMonks |
Re: Hex String XORby moritz (Cardinal) |
on Mar 12, 2012 at 09:02 UTC ( [id://959088]=note: print w/replies, xml ) | Need Help?? |
You need to pack the hex representation into a binary string, so if you have '112233' you need to create the bytes "\x11\x22\x33". Then you can use the bitwise operators on these byte strings to do what you want. Here's a nice way to do the conversions:
See pack, unpack and perlpacktut for more details.
In Section
Seekers of Perl Wisdom
|
|