in reply to Perl returns NaN after addition
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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl returns NaN after addition
by pimperator (Acolyte) on Oct 17, 2013 at 01:03 UTC | |
by LanX (Saint) on Oct 17, 2013 at 01:09 UTC |