Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: differences between eq "" and !

by imp (Priest)
on Dec 14, 2006 at 04:08 UTC ( #589741=note: print w/ replies, xml ) Need Help??


in reply to differences between eq "" and !

The value obtained by using an array in scalar context is the number of entries in that array - and an empty string is not a number.

Neither test in the code you provided will print anything, as it is equivalent to this:

if (0 eq "") { print "TEST1 passed\n"; } if (0) { print "TEST2 passed\n"; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2016-06-26 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (331 votes). Check out past polls.