You use the eq if you are comparing strings and == for numbers. Also, you shouldn't need quotes when using == as it is comparing numbers.
Lastly the difference between single quotes and double quotes is that double quotes support interpolation (if you use a variable in double quotes the variable value will come through - with single quotes it wont.
Cheers
In the most welcoming way possible, I'd like to challenge some of what you posted ;) Your post obviously shows that you are knowledgable and have a love for a good debate to uncover the truth, so I am guessing that you won't mind me challenging your statement.
>>"...Depending on the programming language..."
From what I can see, Linda's question is a perl question. In perl, a string is a 'primitive', and yet ($string1 == $string2) won't compare the string primitives, it will compare the value of the string if it can be converted to a number (also might result in a 'compiler' warning depending on the how strict perl is being invoked). Example:
if ($str == 0 && $str ne "0") {
warn "That doesn't look like a number";
}
In perl, when you use == on a more complex data structure (say an array), then you'd be doing it in a scalor context (else you'd get a compiler error), in which case you'd be comparing the number of elements in the array, not whether the array references are the same.
So that is how it is in perl. To be honest, if I think through a range of other languages (C, C++, java, javascript, php, fortran, ada, Visual Basic, pascal, ...) I can't find one language where your definition is true, although I'd agree it would be a neat definition in a generic sense.
Have I missed your point?
Shawn