On Mon, Jan 17, 2011 at 7:40 AM, Paolo Bonzini <pbonz...@redhat.com> wrote: > On 01/15/2011 06:45 PM, Blue Swirl wrote: >> >> + if ($level == 0 && !$block =~ /^\s*\{/ && >> !$allowed) { > > I'm not a Perl expert at all, but I think you need parentheses for the > argument of "!":
! has higher precedence than =~: http://perldoc.perl.org/perlop.html#Operator-Precedence-and-Associativity > if ($level == 0 && !($block =~ /^\s*\{/) && !$allowed) { Maybe instead: if ($level == 0 && $block !~ /^\s*\{/ && !$allowed) {