Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

typo in camel 3

by jptxs (Curate)
on Apr 10, 2001 at 05:07 UTC ( [id://71218]=perlmeditation: print w/replies, xml ) Need Help??

seems to be a typo in camel 3 on page 416. the REAPER sub reads:
sub REAPER { 1 until waitpid(-1, WNOHANG) == -1) }

it should be:
sub REAPER { 1 until ( waitpid(-1, WNOHANG) == -1 ) } #proper () use

I follow books too blindly and was sure I'd done something wrong for about 15 minutes. don't let the same happen to you =)
"A man's maturity -- consists in having found again the seriousness one had as a child, at play." --Nietzsche

Replies are listed 'Best First'.
Re: typo in camel 3
by davorg (Chancellor) on Apr 10, 2001 at 12:10 UTC

    It's worth checking the Errata page before reporting errors like this. I've had a quick look and can't see this error listed.

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

(tye)Re: typo in camel 3
by tye (Sage) on Apr 10, 2001 at 07:43 UTC

    The parens aren't required on statement modifiers. The code as written in the book (well, a reasonable facsimile, anyway) works for me. If it had been

    do { 1; } until...
    then you'd have a more valid point.

            - tye (but my friends call me "Tye")
      The code as written in the book (well, a reasonable facsimile, anyway) works for me.

      Are you sure about that? The code as written has mismatched parentheses. You either need to make the suggested change or remove the parenthesis after -1.

      --
      <http://www.dave.org.uk>

      "Perl makes the fun jobs fun
      and the boring jobs bearable" - me

        I mentally removed the trailing paren when retyping the example. Mea culpa.

        ...and I read that line at least 6 times trying to figure out what could be wrong with it (since jptxs bothered to post about it) before I rewrote it. Comparing the lines I noticed changes to parens at both ends and never recovered from my assumption. /: Dang you, jptxs, next time at least mention "unbalanced", will ya?? (:

                - tye (but my friends call me "Tye")
Re: typo in camel 3
by merlyn (Sage) on Apr 10, 2001 at 05:44 UTC
    Be sure to send this (and all) typos in O'Reilly books to bookquestions@ora.com.

    -- Randal L. Schwartz, Perl hacker


    update: to the morons who voted this down three points in the first five minutes of its life, get a clue, please. Two or three of these people are personality voters rather than people voting based on merit:
    jcwren footpad zdog ar0n ZZamboni TStanley damian1301 PsychoSpunk Masem geektron Macphisto knight mkmcconn j.a.p.h. adamsj vaevictus dusk premchai21 voyager bsb stevens

      I didn't bother with this post (no ++ no --) because it was factual, simple, and correct. After you updated and made accusations, here, I --'d it. If you are correct, and 1/7 of these people are guilty of personality voting, you've fingered 6/7 of them unnecessarily. That's not right. Otherwise, I have no issue with your original post.

      -OzzyOsbourne

      A reply falls below the community's threshold of quality. You may see it by logging in.
      is said list really appropriate?

      i, like Ozzy, hadn't even looked at this node ( until now, anyway )

      and a mass condemnation like this IS likely to have the effect Ozzy describes.

      yes, you said '2 or 3' of a list of 21 people. that's more condemnation than needs to be spread around, IMHO.

      Was looking for node. Realized it had reference to self. Searched for self. Found this. False accusation. Now voted down.

      'Nuff said.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://71218]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-25 17:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found