Profile

unixronin: Galen the technomage, from Babylon 5: Crusade (Default)
Unixronin

December 2012

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Page Summary

Most Popular Tags

Expand Cut Tags

No cut tags
unixronin: Ummm....   It's an avatar.  No, not an Airbender or a Na'vi.  Just an avatar. (Hiro-ic)
Friday, September 29th, 2006 10:55 pm

The question came up elsewhere of what's the most CPU-time-effective way in Perl to determine whether a scalar's value "looks like a number".  It led to the following thought:

In some languages, you can ask the question "Is this variable an INT?" and get a YES or NO answer.

There are others in which you can ask "Are you an INT?" and get the answer "No, I'm a pointer to CHAR."

And then there's Perl, which more or less answers, "Why, sure, honey, if that's your kink we can do that, no problem...."

Tags: