You could perform a sort of type checking with VAL:

If a string is "123" then VAL will return 123 and string will equal val(string).

ie:
$a="123"
$b=val($a)

according to kix $a=$b

but, if $a="123x" then $b=123 and $a<>$b

hope this helps


cj