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

Re: Something is defined when it shouldn't be?

by choroba (Bishop)
on Nov 30, 2012 at 22:54 UTC ( #1006532=note: print w/replies, xml ) Need Help??


in reply to Something is defined when it shouldn't be?

' ' is true in Perl. Only 0, '0', '', and undef are false (see What is true and false in Perl?). The word "defined" has a different meaning, too (see defined).

If you are only interested in values that contain a digit, you can use a regular expression: /[0-9]/.

لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006532]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-10-20 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (258 votes). Check out past polls.

    Notices?