The problem is that perl is non-typed. It doesn't make a distinction between "1" as an integer and "1" as a string. It decides the value in the "context" that it's working in. "eq" would be a string, and "=" would _probably_ be an integer compare.
The only way to FORCE an integer compare would be to preface the field with int() --- The only real way to guarantee it's a number compare is probably to use a mathematical operator on it ... such as $total = $varable_value_is_1 + 12 to get 13.
This is a subtlty of perl and trickery that I have to admit I'm not intimately familiar with. You might want to ask this on the perl board, since there are probably others who might know how to force that to happen who read there.
The reason it would be smoother to do inside MySQL and temporary tables, is that MySQL _is_ typed, and it would (should) watch how it makes integer vs string comparasons. Additionally, you'd get alt-links in order.
http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/
The only way to FORCE an integer compare would be to preface the field with int() --- The only real way to guarantee it's a number compare is probably to use a mathematical operator on it ... such as $total = $varable_value_is_1 + 12 to get 13.
This is a subtlty of perl and trickery that I have to admit I'm not intimately familiar with. You might want to ask this on the perl board, since there are probably others who might know how to force that to happen who read there.
The reason it would be smoother to do inside MySQL and temporary tables, is that MySQL _is_ typed, and it would (should) watch how it makes integer vs string comparasons. Additionally, you'd get alt-links in order.
http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/