in reply to The instance/type of a variable
To differ between scalars, I do kludgy stuff (like add 0 and see if the result is not-zero and =~ /^\s*0\s*$/.) (-: Someone else will certainly answer better. :-)