Thanks everyone, for some reason a regexpr never came to mind. 

Good thing its Friday,

Dylan

-----Original Message-----
From: Dan Muey [mailto:[EMAIL PROTECTED]] 
Sent: January 10, 2003 1:35 PM
To: Dylan Boudreau; [EMAIL PROTECTED]
Subject: RE: menu


You need a regular expression like 
Until ($selection =~ m/^1$|^2$|^9$/) {
Do some stuff
}

The ^ and $ keep them from enterin say '12' or '109' or 'I love 1
monkey'.

Remove them if you only care that they at least type the digit and don't
care if there's extra stuff

Dan

-----Original Message-----
From: Dylan Boudreau [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 10, 2003 11:24 AM
To: [EMAIL PROTECTED]
Subject: menu


I am trying to make a small menu for a script and the options are 1 or 2
or 9.  I have it written like this
 
until ($selection == '1|2|9'){
     do some stuff
}
 
 
and it wont work.  I know it is something simple but I am a little
simple myself today and don't know what I am doing wrong.
 
 
Thanks,
 
Dylan

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to