On Jul 10, 2006, at 11:15 AM, simonh wrote:

> Thanks Une bue
>
> It seems I didn't need the parameter to the method. Also forgot to add
> the second elsif (to check if too old). If I run the program and type
> 'a' instead of a two digit number the first if statement gets  
> printed -
> 'sorry too young'
>
> what i want is for the else statement to be run if user input is not
> entered as two digits. How would I do this? Somehow got to check if
> gets recieves an integer of two digits.

use regex. if they enter a number it will match /\d+/

-- Elliot Temple
http://www.curi.us/blog/