On Thu, 30 Aug 2001, Rajanikanth Dandamudi wrote:

>    My doubt is  "How do  you identify whether  a  perl scalar variable
>    contains a  numeric  value or  alphanumeric  string?" . I had  gone
>    through       the    explanation     available      at    the   URL
>    http://www.cpan.org/doc/FMTEYEWTK/is_numeric.html   ,  but I didn't
>    understand that explanation. Thanks in advance.

What do you not understand?  As the page remarks, it's not as big a
problem as people make it out to be.  Perl does a fine job of being able
to automagically convert back and forth.  If you can remember that text
used in a == comparison will be 0 ($text == 0 is true), you should be
safe.  If you need to test against 0 itself, test to see if the string is
equal to '0'.

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
Go 'way!  You're bothering me!


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to