Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by LanX (Saint)
on Dec 14, 2012 at 17:20 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1008884]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found