In article <[EMAIL PROTECTED]>,
        Yitzchak Scott-Thoennes <[EMAIL PROTECTED]> writes:
> On Wed, May 04, 2005 at 11:26:24AM -0400, Brad Baxter wrote:
>> On Wed, 4 May 2005, Ronald J Kimball wrote:
>> [...]
>> >
>> > If the programmer wants two separate loops over <> in your program, he
>> > should probably just write the code himself.  Is it really worth the added
>> > complexity to support multiple -p and/or -n in the same command line?  I'm
>> > curious whether people think this would actually see a lot of use.
>> 
>> As for me, I'm not wedded to the idea.  I just started thinking out
>> loud when it sounded like folks were edging toward working on a patch.
> 
> 'twould be good to consult some golfers on what they would find
> helpful.  (No, I'm not joking.)

Actually a -E style patch would have little influence on golf as
it's usually played here since we only use options on the #!perl line,
which is not where this stuff would happen. We also don't use -M and
options like that for the same reson. And since we put the code in the 
file body we already don't have the explicit -e.

There's also the point that in golf it's mostly an END{} block that's
wanted, and these are kindof solved by using the }{ trick:

   perl -lpe '}{$_=$.' < /etc/passwd

BEGIN is also sometimes needed and has no good standard solution.
Usually something with INIT{} is used.

(writing this makes me realize we might want to discuss the scope of
-l and -0 options if we're going to support multiple -p and -n)

The reason I like the idea is not for golf but for commandlines

Reply via email to