Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^4: Hex String XORby flexvault (Monsignor) |
on Mar 12, 2012 at 18:48 UTC ( [id://959158]=note: print w/replies, xml ) | Need Help?? |
tobyink, Reading the Camel book (3rd and 4th editions), "...if both operands are strings...the operators do bitwise operations between corresponding bits from the two strings. In this case there's no arbitrary limit..." So the following code should work (untested) and be faster than calling a subroutine and looping:
I used this technique to generate a 8-byte CRC for arbitrary text strings by using 'substr' to take 8-byte substrings. I needed the looping for that. Regards...Ed "Well done is better than well said." - Benjamin Franklin
In Section
Seekers of Perl Wisdom
|
|