Hello , I am reading data in from an Ascii comma delimited text file information
using the Text::ParseWords module, with @bob = &parse_line(",", 0, $_);
as per split the comma delimited file with function @words = &parse_line($delim, $keep, $line);
What is a simple way to make sure a value is a number and not treated as a letter.
$bob[19] = 0 or is it $bob[19] ="0" ?
So when I test like this :
if ($bob[19] > 0 ) { print "Greater than zero"; }
else { print " less than or equal to zero "; }
How can I make sure the value in $bob[19] is treated as a number and not a ascii character ?
Thanks
Kode
using the Text::ParseWords module, with @bob = &parse_line(",", 0, $_);
as per split the comma delimited file with function @words = &parse_line($delim, $keep, $line);
What is a simple way to make sure a value is a number and not treated as a letter.
$bob[19] = 0 or is it $bob[19] ="0" ?
So when I test like this :
if ($bob[19] > 0 ) { print "Greater than zero"; }
else { print " less than or equal to zero "; }
How can I make sure the value in $bob[19] is treated as a number and not a ascii character ?
Thanks
Kode