Mark Goland wrote: > > > How do I challenege more than one variable like I want to > > check for the input of Y N y or n for a yes no question. I > > put until $answer =~ m/YyNn/ that did not work. Anybody have > > any solutions? > > the way you did it, would need to use or operator > $answer =~ m/Y|y|N|n/ > you probebly want to check if thats the only thing entred, > > $answer =~ m/^yn$/i > > ^ begins with, $ ends with, i is for case insensetive.
That would work if the user entered the string "yn" (or "YN" or "Yn" or "yN".) It should be either: $answer =~ m/^(?:y|n)$/i; Or: $answer =~ m/^(?i:y|n)$/; Or: $answer =~ m/^[yn]$/i; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]