Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://815190]
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-11 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (169 votes). Check out past polls.