in reply to Unmatched right curly bracket ...

I'm not sure from the preceeding replies that you have solved the problem . . .but even if you have this is good to keep in mind.

I once stared at this subroutine for *5* hours trying to figure out where the missing curlie was . . .and eventually I found it. My problem? A missing curlie several hundred lines before - because my subs are generally at the end of a file, perl managed to parse the whole thing not finding the "missing curlie" error until the last couple of lines. Using the debugger would have helped had I known at the time how to use it. But keep in mind that, like run away lines and strings, missing curlies often creat errors at a distance - far more distance than any other error I've encountered.

Cheers,
Erik

Replies are listed 'Best First'.
Re: Re: Unmatched right curly bracket ...
by blakem (Monsignor) on Mar 10, 2002 at 04:20 UTC
    Yikes. 5 hours! In the interest of saving you the hassle next time, might I recommend perltidy? The perltidy documentation shows how it helps find mis-matched braces at: An example of finding a nesting error (here it is in googles cache since the above link isn't working for me at the moment.)

    -Blake

Re: Re: Unmatched right curly bracket ...
by Gerard (Pilgrim) on Mar 01, 2002 at 03:24 UTC
    Thanks all for your comments. I manageed to solve it in the end, by removing my sloppy, trailing spaces. Erik, I did already think of that, I ran the subroutine as seperate file altogether and got the same error, which is how I knew it was in there. Thanks anyway.

    Regards,
    Gerard.