Personally, when I'm writing for others (particularly beginners, like here
in the tutorial), I prefer to use the print statement as the author did, or
a heredoc.  It's explicit and obvious, and the reader can see precisely what
is to be generated.  I have been known, instead, to use the functions, but
then I always feel compelled to add a comment explicitly describing the code
to be generated.  The same principle applies in any language, actually: it
really makes it easier for newbies to read.  Or maybe I just need my
medication adjusted ;)

By the way, the tutorial is great.  I think this is a tremendous service to
the community that you're performing.

> -----Original Message-----
> From: fliptop [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 13, 2001 7:27 PM
> To: Ken Scott
> Cc: Perl Beginners CGI
> Subject: Re: beginner's addressbook tutorial - step 3 - creating
> perlclasses and our first cgi
> 
> 
> Ken Scott wrote:
> > 
> > on 6/10/01 10:19pm, fliptop at [EMAIL PROTECTED] wrote:
> > 
> > > step 3 is complete, and is available at:
> > >
> > > http://www.peacecomputers.com/addressbook_toot-step3.html
> > >
> > > coming next - step 3 - the perl handler, and a table of 
> contents for the
> > > tutorial
> > >
> > 
> > print "Content-type:  text/html\n\n";
> > 
> > My question is this: Since you already have the CGI module 
> included and
> > used, why not call the CGI module's header() function? I 
> thought that it did
> > the same thing, and might be a little clearer in intent.
> 
> i could, since both statements do the same thing.  now that i think
> about it, i really don't know why i still do it manually.  force of
> habit, i guess.  that's the beauty of perl, 'tmtowtdi'!
> 
> > Also, would it be possible to create a link at the end of 
> each step of the
> > tutorial to go to the next step?
> 
> yes, i'm working on that.  maybe i'll implement that before working on
> the next step.
> 
> > So far, this is an excellent tutorial. Thanks for taking 
> the time to do it.
> 
> thanks for the encouragement.  my wife is pissed, though, because i
> haven't been making it to bed until like 1 or 2 am since i took on the
> task.  i'll share your sentiment with her (although i'm sure 
> it'll be of
> little comfort!).
> 

Reply via email to