in reply to How to implement numeric checking in my program.
PS - Sorting to find the highest value doesn't scale as well as simply checking each value in turn to see if it's higher than the highest one seen to date.
PPS - Your prof could have used Scalar::Util's looks_like_number rather than using fatal warnings and eval. His solution doesn't even work in all circumstances. (Specifically, objects that numify to undef.)
|
|---|