in reply to Q: NaN again

Perl doesn't do very much that's special for NaNs. The main thing is not warning if you use a NaN string in numeric context. Pretty much all the hard work is done by strtod and sprintf/gcvt/etc. and there's not good way to turn that off.