Just another Perl shrine | |
PerlMonks |
Re^5: Hex String XORby tobyink (Canon) |
on Mar 13, 2012 at 01:19 UTC ( [id://959214]=note: print w/replies, xml ) | Need Help?? |
Yes, ^ does work on strings, but as the OP mentioned, it works on the string's bytes, not the hexadecimal numbers encoded in the string.
My code gives the latter behaviour (which the OP wants) on hexadecimal strings of arbitrary length.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|