From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24715 invoked from network); 3 Jul 2001 17:04:53 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Jul 2001 17:04:53 -0000 Received: (qmail 9747 invoked by alias); 3 Jul 2001 17:03:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15237 Received: (qmail 9732 invoked from network); 3 Jul 2001 17:03:52 -0000 From: "Bart Schaefer" Message-Id: <1010703170319.ZM14785@candle.brasslantern.com> Date: Tue, 3 Jul 2001 17:03:19 +0000 In-Reply-To: <20010703125123.A5242@dman.com> Comments: In reply to Clint Adams "PATCH: zsh/pcre module docs" (Jul 3, 12:51pm) References: <20010703125123.A5242@dman.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Clint Adams , zsh-workers@sunsite.dk Subject: Re: PATCH: zsh/pcre module docs MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 3, 12:51pm, Clint Adams wrote: } Subject: PATCH: zsh/pcre module docs } } This describes the behavior introduced by 15228. } Perhaps there should be a switch to disable } the clobbering of pparams, though I don't believe } perl has a similar feature. Wouldn't it have been better to put these in the $match array (or into some other named array) the way that backrefs in glob patterns do? $1 etc. in Perl are not positional parameters -- you don't lose access to @ARGV when you do a pattern match. I think clobbering the positionals is more harmful than helpful; if you want to be able to reference $1 etc. you can always do pcre_match ... set - "$match[@]" # or whatever it is named For comlete generality, pcre_match could take the name of the array to set as an argument; then the above could be accomplished with pcre_match -a argv ... (where I've chosen -A somewhat arbitrarily, and another character might be better). -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net