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

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

by choroba (Chancellor)
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 drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2016-12-09 23:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (158 votes). Check out past polls.