Can you show us what you have so far?
If you don't have anything yet, you might consider building a loop that reads from STDIN, and then checks the string for non-numeric characters with a regular expression. Don't forget to chomp! Once the string is in the format you want, leave the loop and process it however you want.
In reply to Re: force user to only enter numbers
by AR
in thread force user to only enter numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |