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

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

Replies are listed 'Best First'.
Re^4: How do I find the missing curly brace??
by pfaut (Priest) on May 07, 2025 at 19:07 UTC
    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