[Oops, I fired off too-early a draft. Here's the full thing...]
Okay, in the (probably forlorn) hope of finally Beating This Subject To Death, let me offer a (possible) new position on NaN. NaN is dead. It's not pinin'! It's passed on! This value is no more! It has ceased to be! It's expired and gone to meet its maker! It's a stiff! Bereft of life, it rests in peace! If we hadn't nailed it to an Exegesis, it'd be pushing up the daisies! Its metabolic processes are now 'istory! It's off the twig! It's kicked the bucket, shuffled off its mortal coil, run down the curtain and joined the bleedin' choir invisible!! THIS IS AN EX-NaN!! Except perhaps under a C<use IEEE> pragma of some kind, in which case it would be a proper IEEE Norweigian Blue NaN. Meanwhile, C<undef> will numerify to zero (asit always has; as we always intended that it still would). Unary C<+> (and other numeric contexts) will produce C<undef> when attempting to convert non-numeric strings. To check for numericity of input, you'll write: $number = +<$fh> until defined $number; If you ignore the definedness, the C<undef> will just promote to zero in numeric contexts. So you can add up your column-50 numeric fields with: $sum += +unpack("@49 A3", $_) while <$fh>; and have the summation ignore non-numeric fields. Or you can add the fields with: $sum += +unpack("@49 A3", $_) // die "Bad data: $_" while <$fh>; and handle errors with extreme prejudice. Have I missed anything? Damian