in reply to Re: Perl Gotchas.
in thread Perl Gotchas.

In perl a common problem that I've seen is a single missing }, which in a large file is sometimes reported as being missing at the end of the file
Indeed, it would help if perl would point towards the opening { that is missing the closing brace, instead of pointing towards the end of the file, where the closing } is supposedly missing. I know where the end of the file is, thank you, I don't need anyone to point it out to me.

Replies are listed 'Best First'.
Re: Re: Re: Perl Gotchas.
by ambrus (Abbot) on Nov 22, 2003 at 21:28 UTC

    A good trick in this case is to insert a } to the end of the file, and find its pair with your text editor. Most editors nowdays can do that (^G in joe; ^K[ in borland (unsure); % in vi; ^F^[b in emacs; } in less). Of course, this won't always work, it might jump to a different place than where the error is, but it's worth a try.