On Mon, 6 Jan 2003, Christopher D. Lewis wrote:

> I was able to eliminate several compile errors, but got stuck when the
> errors stopped giving me clues I knew how to follow.

Are you running with warnings & strict mode?

    #!/usr/bin/perl -w

    use strict;
    # .....

That might make the error messages more useful.

Beyond that, as Ken said, missing or misplaced semicolons and closing
parens / braces / brackets / etc can make things go haywire.

If your text editor can do syntax highlighting, it can be illuminating to
trigger the highlighting to see what characters balance against each
other. For example, in Vim I can replace a parenthesis with itself, & the
cursor will briefly highlight the opening paren that is balanced against
the current character.

This is a quick way to zoom in on what was typed the way it was intended,
and which things are out of whack. Similar tricks, in Vim, Emacs, BBEdit,
or whatever, can be used to narrow down sections of code that are correct
& which need more examination.



-- 
Chris Devers    [EMAIL PROTECTED]

drag queen, n.
A move in GUI chess.

    -- from _The Computer Contradictionary_, Stan Kelly-Bootle, 1995

Reply via email to