Sorry, hit the send button early :)

Ignore that mail...

-----Original Message-----
From: John Edwards 
Sent: 30 August 2001 16:52
To: 'Rajanikanth Dandamudi'; '[EMAIL PROTECTED]'
Subject: RE: Doubt 


It doesn't matter to Perl if you store alphanumerics or numbers or both in
scalar. When you want to perform a numeric function on the scalar, Perl
treats the data in it as numeric. When you want to perform an alphanumeric
on it, it treats the data as alphanumerics.

e.g

$data = "one";
$new = "$data + 10";
print $new;

You could use a regular expression to check the data. Here is some commented
sample code

# Initialize the scalar and store the string
$data

-----Original Message-----
From: Rajanikanth Dandamudi [mailto:[EMAIL PROTECTED]]
Sent: 30 August 2001 16:35
To: '[EMAIL PROTECTED]'
Subject: Doubt 


Hello,

   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.

Thanks and Regards,
Rajanikanth




--------------------------Confidentiality--------------------------.
This E-mail is confidential.  It should not be read, copied, disclosed or
used by any person other than the intended recipient.  Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful.  If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.



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

Reply via email to