in reply to Syntax errors galore, need a good debugging

Exactly as the error message indicated, your error is in this line:

qq(<a href="log.pl" target="new">chat logs</a>),

Exactly as you suspected, you need a semicolon here to end the statement. Next time you see this error, trust the error message.

Please don't ask people to count the lines of your program manually — use a good editor that either numbers your lines for you or can jump to a specified line. Look around there for the error. You could have solved this yourself in a few moments. Don't be afraid to try.

Replies are listed 'Best First'.
Re: Re: Syntax errors galore, need a good debugging
by sulfericacid (Deacon) on Jun 25, 2003 at 05:56 UTC
    I do trust the errors it gives me and I honestly did add a semi colon to the end which didn't solve the problem. I did try my hardest to solve this on my own but once I get the error shifted from one thing it moves on to the next and it feels like I'm getting further away from getting this done.

    Adding the semi colon gave me:

    syntax error at chat.pl line 90, near "qq(<a href="log.pl" target="new +">chat logs</a>);"


    "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

    sulfericacid

      My guess is that you need a closing parenthesis for the table() function. Again, a good editor will help you with this. In vi or vim, you can put the cursor on one brace and hit the % to jump to the other.

      It's also good to get in the habit of typing the ending brace right after you type the opening brace. Then, back up a character and type the contents inside. Consistent indentation helps.

      One debugging trick I like is to comment out code. If I were you, I'd comment out everything before the table(), including the comma, and end the line with a semicolon right there. If that works, you know you've found the error. I use the __END__ token quite often to comment out everything after the current code.