Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Just another Perl shrine
 
PerlMonks  

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

by LanX (Abbot)
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 chanting in the Monastery: (16)
As of 2014-04-17 14:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (449 votes), past polls