> my $var = 0; > # or my $var = "0"; > # or my int $var = 0; > # or my num $var = 0; > > # all 4 cases should print "is integer" > print "is integer" if int $var == $var; > > This should work as a more generic method to test Integer > *value*, rather than type, which IMHO is more useful (and > more commonly wanted). >
I agree. And i found an interesting thread about that in comp.object http://groups.google.de/groups?hl=de&lr=&ie=UTF-8&oe=UTF-8&threadm=1990S ep28.181057.16740%40odi.com&rnum=5&prev=/groups%3Fq%3DVariable%2BTypes%2 BVs%2BValue%2BTypes%26hl%3Dde%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3 D1990Sep28.181057.16740%2540odi.com%26rnum%3D5 Murat