while(<>) { print "yes\n" if /(^y$|^yes$)/i; }