http://qs321.pair.com?node_id=797518


in reply to irritation makes perls

Such as the fact that there are two sets of comparison operators

Would you rather do what all the other languages do, declare every variable as specific type( a string, a number, a null, or an object). I can live with two operators.

Using == with strings accounts for at least 90% of my mistakes

You must be use to another language, like Javascript. This is not a problem with Perl, but rather what you have become used to.

Replies are listed 'Best First'.
Re^2: irritation makes perls
by Anonymous Monk on Sep 25, 2009 at 21:17 UTC
    Turns out you shouldn't use == in javascript, JS doesn't have warnings/strict (although it will have strict in the future)
    '' == '0' // false 0 == '' // true 0 == '0' // true false == 'false' // false false == '0' // true false == undefined // false false == null // false null == undefined // true " \t\r\n " == 0 // true