On Thu, Dec 29, 2011 at 5:48 AM, Ed Avis <perlbug-followup@perl.org> wrote: > # New Ticket Created by "Ed Avis" > # Please include the string: [perl #107262] > > I expected a warning from these because \Q and \E are not matched: > > % perl -wE '$_ = "a"; /\Qa/ or die' > % perl -wE '$_ = "a"; /a\E/ or die' > > I suggest that at the end of the regexp, if a \Q is still open then > warn. > Unterminated \Q has been seen as perfectly acceptable, and is commonly used. Warning on it would create too many spurious warnings. This check belongs in linters (e.g. perlcritic). If \E is found but there was no active \Q \l \u \L \U then warn. > \u and \l have nothing to do with \E, but warning on \E if there's no \Q, \L or \U in effect sounds appropriate to me. - EricThread Previous | Thread Next