in reply to Re: How do I find the missing curly brace??
in thread How do I find the missing curly brace??

perltidy is a good suggestion. Similarly, vim or some other editor that does highlighting or highlights the start/end of the current BLOCK, might be useful. I wonder if perlcritic would similarly be useful? And maybe as a final stab, perl -c.

Replies are listed 'Best First'.
Re^3: How do I find the missing curly brace??
by LanX (Saint) on Dec 31, 2024 at 11:41 UTC
    perl -c will just reproduce the same error he already reported.

    But probably he can do a binary search by only compiling the first half of the source.

    If it works add a quarter, otherwise subtract one.

    And so on, till he identified the problem...

    I think he will need to do the splitting manually tho, and can't rely on an automatic bisect.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery

      But probably he can do a binary search by only compiling the first half of the source.
      If it works add a quarter, otherwise subtract one.

      You can do this easily by inserting '__END__' after a subroutine, then moving it up or down a few subroutines based on whether perl -c reported any errors.

      90% of every Perl application is already written.
      dragonchild