$_ = "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
In reply to Re: Disadvantage of using 'eq' operator to compare numbers.
by JavaFan
in thread Disadvantage of using 'eq' operator to compare numbers.
by paragkalra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |