Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Perl allows you to change the definition of false to make it true. (And vice versa.)

by LanX (Canon)
on Dec 14, 2012 at 17:20 UTC ( #1008884=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    >>> true
     
    ...
    >>> "stringification: " + (1==1)
     
    "stringification: true"
    
  2. or download this
    use v5.10.0;
    use boolean;
     
    say true;
    say "stringification:" . (1==1);
    
  3. or download this
    /usr/bin/perl -w /tmp/boolean.pl 
    1
    stringification:1
    
  4. or download this
    use Scalar::Util qw/dualvar/;
     
    ...
    say $false;
    say "stringification: " . $false;
    say "numification: " . (0+$false);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008884]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2015-07-02 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (30 votes), past polls