Message from discussion
The map function
Path: g2news1.google.com!news4.google.com!out03a.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!cycny01.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny09.POSTED!9c7fbf25!not-for-mail
From: Jürgen Exner <jurge...@hotmail.com>
Newsgroups: comp.lang.perl.misc
Subject: Re: The map function
Message-ID: <h06u04tpskpq5tqhr2tcsc28fr0ibnergt@4ax.com>
References: <slrng0mhgh.ujm.tadmc@tadmc30.sbcglobal.net> <1208755083_3027@news.newsgroups.com> <x7fxtfeojz.fsf@mail.sysarch.com> <1208828437_3041@news.newsgroups.com> <4cqq045hepcr8jj6llnrfk8pr7r9rume5i@4ax.com> <x78wz6tscj.fsf@mail.sysarch.com> <1208839744_3044@news.newsgroups.com> <slrng0r3ie.j1a.allergic-to-spam@no-spam-allowed.org> <1208899188_3070@news.newsgroups.com> <slrng0t2vg.sbv.allergic-to-spam@no-spam-allowed.org> <x7d4oh6k7s.fsf@mail.sysarch.com>
X-Newsreader: Forte Agent 4.2/32.1118
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 22
Date: Wed, 23 Apr 2008 11:08:46 GMT
NNTP-Posting-Host: 71.112.10.152
X-Complaints-To: abuse@verizon.net
X-Trace: trndny09 1208948926 71.112.10.152 (Wed, 23 Apr 2008 07:08:46 EDT)
NNTP-Posting-Date: Wed, 23 Apr 2008 07:08:46 EDT
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