[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Love & Hate shenanigans




On 29 Mar 2001, Jasvir Nagra wrote:
> 
> For bonus points, can anyone say anything about Xor Bulleans.

They're boring.  ($a ^ $b) eq $b if and only if $a is an empty string or
composed entirely of NULs (and not longer than $b).

However, there are some nice ways in which ASCII characters behave in
XOR operations.  In particular, XORing a letter with a space flips the
case of that letter, so ("foo" ^ " ") eq "Foo".

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"And I think I've probably failed to express the thing I'm trying to say, but
 I'll send this version, and when people object to it I might figure out words
 I really needed to use to say it."  -- Lucy Kemnitzer in r.a.sf.c



==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe