Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion The map function
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jürgen Exner  
View profile  
 More options Apr 23 2008, 7:08 am
Newsgroups: comp.lang.perl.misc
From: Jürgen Exner <jurge...@hotmail.com>
Date: Wed, 23 Apr 2008 11:08:46 GMT
Local: Wed, Apr 23 2008 7:08 am
Subject: Re: The map function

Uri Guttman <u...@stemsystems.com> wrote:
>>>>>> "JC" == Jim Cochrane <allergic-to-s...@no-spam-allowed.org> writes:

>  >> do you know which braces need a semicolon after?

>  JC> If I remember correctly, line 18 (from your error message) was either
>  JC> the offending line with the close curly brace missing the ';' or the
>  JC> line (print ...) below it.  So you know where to look because of the
>  JC> line # in the error message.  Of course, now that you know that 'do {}'
>  JC> blocks need a semicolon after them (right?), you know to look for that

>actually do blocks are just expressions and the statement they might be
>in will need a ; (and of course in perl ; is a statement separator and
>not a terminator). in this case the do block was the end of the
>statement and needed a ; before the print. an if block (or other flow
>control block isn't a statement so they don't need ; after them.

Another reason to avoid do{} blocks that are dozens of lines long. At
the end of such a block you surely have forgotten, if it is a flow
controll block or an expression.

jue


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.