in reply to Re^2: conditional regexin thread conditional regex
while(<>) { print "yes\n" if /^y$/i || /^yes$/i; } [download]
while(<>) { print "yes\n" if /^y$/i; print "yes\n" if /^yes$/i; } [download]
By the way, useless capturing greatly slows down pattern matching.