2 ms·
That is not what perl and bash do. They distinguish between "comparing as strings" and "comparing as numbers". For example, the strings "03" and "3" are differe
by Someone 12y ago
That is not what perl and bash do. They distinguish between "comparing as strings" and "comparing as numbers". For example, the strings "03" and "3" are different, but as numbers, they are equal (and, I guess "010" is equal to "8", numerically. I didn't try, because I don't want to know)
For bash, read http://unix.stackexchange.com/questions/16109/bash-double-equals-vs-eq http://unix.stackexchange.com/questions/16109/bash-double-eq... (especially http://unix.stackexchange.com/a/120235 http://unix.stackexchange.com/a/120235) and weep.
For perl, see for example http://www.perlmonks.org/?node_id=276023 http://www.perlmonks.org/?node_id=276023