It looks like you had a non-numeric variable in the data file!
> so how would I test for that?
stop reading the file as soon as you get NaN. Print the line number '$.' and dump line and column with Data::Dumper
BTW: did you use warnings?
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re: Perl returns NaN after addition
by LanX
in thread Perl returns NaN after addition
by pimperator
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |