In the case of strings and numbers, I'd recommend using leg instead of cmp - that is, coerce both items to strings, then compare the strings. But as far as cmp goes, "3 cmp '3'" should fail because a number isn't a string.
-- Jonathan "Dataweaver" Lang