Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2023-03-28 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (66 votes). Check out past polls.

    Notices?