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

Re^3: What is true and false in Perl?

by tobyink (Canon)
on Oct 18, 2012 at 02:26 UTC ( #999654=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Does not say "true". This is as you describe.
    say "true" if undef, undef;
    
    # Still doesn't say true.
    say "true" if 1, 2, 3, 4, undef;
    
  2. or download this
    say "true" if 1, 2, 3, 4, undef;
    
  3. or download this
    sub x {
      1;
    ...
      return undef;
    }
    say "true" if x();
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2023-12-10 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (40 votes). Check out past polls.

    Notices?