in reply to Loop counter only works for 2

Nothing dumb about this. Just inexperience.

Frankly, though, you have hit one of my great pet peeves. Embedding printing (ie. heredocs, html, forms) in the perl only leads to serious maintenance issues. Good job security, but bad style.

At the very least, look into using CGI.pm; however, I recommend that you use a module specific to template processsing. I prefer Template Toolkit but there are several of them. If you are not familiar with what templates are, its a good time learn. You won't regret it.

(Plus, don't you just hate having to escape all the quotes. Use qq(foo) instead.))


I admit it, I am Paco.

Replies are listed 'Best First'.
Re: Re: Just plain dumb
by rendler (Pilgrim) on Jan 09, 2002 at 14:03 UTC
    I usually use blah <<"END; Is there any difference between that and qq?
      Not much, but you can use them in different ways.

      e.g. you can do this:

      print qq{the "cat" sat {furrily} on the 'so-called' mat};
      without having to escape any of the quotes, or the brackets.

      The same is true of a here document (e.g. <<"END") of course, in fact that's more adaptable because it can contain anything at all (except \nEND, obviously), but it takes more than one line.

      hth,
      andy.