|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: Any improvement over the code possible??by toolic (Chancellor) |
| on Sep 21, 2012 at 16:50 UTC ( #994944=note: print w/ replies, xml ) | Need Help?? |
|
Add input checking. If I input "2" and "F", the code tells me the average is 1. That is probably not how you want the code to behave. Look at Scalar::Util::looks_like_number. See also:
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||