From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25204 invoked from network); 15 Mar 2004 04:00:29 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 15 Mar 2004 04:00:29 -0000 Received: (qmail 15438 invoked by alias); 15 Mar 2004 04:00:15 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7180 Received: (qmail 15384 invoked from network); 15 Mar 2004 04:00:15 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 15 Mar 2004 04:00:15 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [66.51.199.52] by sunsite.dk (MessageWall 1.0.8) with SMTP; 15 Mar 2004 4:0:15 -0000 Received: (qmail 28459 invoked from network); 15 Mar 2004 04:00:12 -0000 Received: from unknown (HELO w250.z064001178.sjc-ca.dsl.cnc.net) (66.218.45.239) by 192.168.8.48 with SMTP; Mon, 15 Mar 2004 04:00:12 +0000 Received: (qmail 76894 invoked by uid 1000); 15 Mar 2004 04:00:35 -0000 Date: Sun, 14 Mar 2004 20:00:13 -0800 From: Jos Backus To: zsh-users@sunsite.dk Subject: Re: Python/zsh/perl [was: named directory expansion on strings] Message-ID: <20040315040035.GB29760@lizzy.catnook.com> Reply-To: jos@catnook.com Mail-Followup-To: zsh-users@sunsite.dk References: <1040313064100.ZM28748@candle.brasslantern.com> <1040314185437.ZM6792@candle.brasslantern.com> <20040314215700.GA61154@quark.hightek.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040314215700.GA61154@quark.hightek.org> User-Agent: Mutt/1.5.6i On Sun, Mar 14, 2004 at 03:57:00PM -0600, Vincent Stemen wrote: > As wonderful of a language as Perl is, that is the one limitation I > have found that gives Z shell an advantage, even over Perl, in > situations where that lower level control is needed. In Perl, it is > far to much unnecessary overhead to split a string on every character, > into a two dimensional array of strings, using the null delimiter, just > gain access to a specific byte of the array. Then, if you modify the > array, you must re-join the data back into a single string. All that, > as opposed to just being able to say "$array[$i] = 'x'". > > This is about the only complaint I can think of I have ever really had > with Perl. lizzy:~% perl -le 'my $a = "abc"; substr($a, 1, 1) = "z"; print $a;' azc lizzy:~% -- Jos Backus _/ _/_/_/ Sunnyvale, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'