Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Modifying loop structure and placement

by merlyn (Sage)
on Dec 24, 2009 at 02:05 UTC ( [id://814181]=note: print w/replies, xml ) Need Help??


in reply to Modifying loop structure and placement

Are you serious? This is one of the exercises in JLFord's book? This is exactly the same exercise rootbeer created for our Learning Perl book.

Of course, it's not that unobvious of a question, but this now seems suspicious. Do you have a copy of Learning Perl to compare some of the other exercises for me? I'm curious now.

-- Randal L. Schwartz, Perl hacker

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

  • Comment on Re: Modifying loop structure and placement

Replies are listed 'Best First'.
Re^2: Modifying loop structure and placement
by irvson (Sexton) on Dec 30, 2009 at 22:13 UTC
    Yes, the Ford script does the same thing, but it's much more involved -- about 175 lines of code. Longer doesn't mean better, of course. I found your script and created the PL file. Much simpler, does the same thing, but uses a regular expression -- which Ford hasn't covered at that point in his book. There sure is a lot to learn here, and comparing the two scripts for "economy" and "verbosity" is just one of those things.
Re^2: Modifying loop structure and placement
by irvson (Sexton) on Dec 30, 2009 at 22:24 UTC
    (Oops. Forgot the second part of your question.) I have both books. I'll look for other similarities. Altho your code in this example is so completely different from Ford's that I would not have noticed the similarity right away. I'm just getting started with your book. I'll keep my eyes peeled. (You would probably satisfy your curiosity more quickly by buying a copy of his book -- or getting it from a library. He constructs each chapter so that the script he uses at the end of the chapter sums up what he presented in that chapter.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-26 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found