in reply to Re: True or False? A Quick Reference Guide
in thread True or False? A Quick Reference Guide
Perl 6:
0/FALSE: 0, "0", "", undef ("0" is true if the type is Str) 1/TRUE: everything else AND OR XOR NOT +& +| +^ +^ <-- bitwise, numeric ~& ~| ~^ ~^ <-- bitwise, string ?& ?| ?^ ?^ <-- bitwise, boolean && || ^^ ! <-- logical, high precedence and or xor not <-- logical, low precedence
- The difference between logical and bitwise boolean is that logical AND and OR return an operand, while bitwise AND and OR return boolean values (the original values are lost).
- ?^/^^, and ?^/! are practically the same.
- ^^ was missing in Perl 5.
- +^, ~^, ?^ are both XOR and NOT, depending on whether they are used infix (in between) or prefix (in front).
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|
---|
In Section
Meditations