Hi ,

You do not need a atoi function in Perl. All the strings can be used as a 
number based on the context.

for example

$str1 = '50';
$str2 = '2';

$sum = $num1 + $num2; # sum is now 52

$str_cat = $num1.$num2; #str_cat is 502


HTH,
Chetak




-----Original Message-----
From: A Madhusudan-A5324C [mailto:[EMAIL PROTECTED]
Sent: Friday, 18. June 2004 14:34
To: Perl List
Subject: String To Number Conversion


Hi All,

Does anyone know how to convert string into Number in Perl. Just like the 
classic atoi function of C.
Thanks a lot in advance

Madhusudan

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to