in reply to Re^2: Chomping Frenzy question
in thread Chomping Frenzy question

Wouldn't this also fail if $chompstr contained \E ?

No, it's magic:

use strict; use warnings; my $str = 'foo\E**** <- this is a syntax error'; if ("foo" !~ m/\Q$str\E/){ print "No syntax error\n"; } __END__ No syntax error

If the quoting had stopped by the embedded \E, you'd get the Nested quantifiers in regex error.