in reply to Re: Re: I think I'm close...
in thread Parsing answer for a 'yes'

The /g is Perl's global match modifier. In this case, you're only looking for a single match, so you don't need it.

I would also suggest taking the approach VSarkiss uses below and anchoring your regex:

	if ($question =~ /^y/i) ...
works great for all concerned, while this:
	if ($question =~ /(yes|y)/i) ...
not only matches, "yes" and "y", but also matches "maybe", "not necessarily", "no way", "definitely not", and "/me rolls eyes".

-- grummerX