Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Disadvantage of using 'eq' operator to compare numbers.

by JavaFan (Canon)
on Jan 01, 2010 at 14:20 UTC ( #815190=note: print w/ replies, xml ) Need Help??


in reply to Disadvantage of using 'eq' operator to compare numbers.

$_ = "Today is 01 Jan 2010"; my ($dayofmonth) = /(\d+)/; print $dayofmonth eq 1 ? "ok 1\n" : "not ok 1\n"; print $dayofmonth == 1 ? "ok 2\n" : "not ok 2\n"; __END__ not ok 1 ok 2


Comment on Re: Disadvantage of using 'eq' operator to compare numbers.
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-12-28 09:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (179 votes), past polls