The string "abc", evaluates to 0 in numeric context - which is *not* greater than 0. The string "1abc" evaluates to 1 in numeric context - which *is* greater than 0. It's the use of the ">" operator that's forcing the strings to be evaluated numerically.