Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by choroba (Canon)
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]/.

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


Comment on Re: Something is defined when it shouldn't be?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2015-07-06 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls