Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^2: True or False? A Quick Reference Guide

by Juerd (Abbot)
on Oct 25, 2005 at 06:43 UTC ( #502640=note: print w/replies, xml ) Need Help??

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 => '', plp_site => '', do_not_use => 'spamtrap' }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://502640]
[stevieb]: use metamod::DateTime. Don't fsck around. Seriously. As someone who's done sensitive date/time stuff, don't roll your own. Use what is available and known stable. Do not guess.
[stevieb]: Date::Time even
[stevieb]: ffs I can't make DateTime link properly, so there.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2017-04-29 04:19 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (531 votes). Check out past polls.