Why make things so complicated? You want to match /[yY](?:[eE][sS])?/ ... but 'eq' is so much simpler ...
I think I need to make Occam's Razore my new .sig ... no one else seems to be defending the concept.my $word = lc $_; print "yes\n" if $word eq 'y' or $word eq 'yes';
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
In reply to Re: conditional regex
by TomDLux
in thread conditional regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |