Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Python/zsh/perl [was: named directory expansion on strings]
- X-seq: zsh-users 7180
- From: Jos Backus <jos@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Python/zsh/perl [was: named directory expansion on strings]
- Date: Sun, 14 Mar 2004 20:00:13 -0800
- In-reply-to: <20040314215700.GA61154@xxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <v5mfocam7x43.dlg@xxxxxxxxxxxxxxxx> <1040313064100.ZM28748@xxxxxxxxxxxxxxxxxxxxxxx> <eern2388dxq8.dlg@xxxxxxxxxxxxxxxx> <1040314185437.ZM6792@xxxxxxxxxxxxxxxxxxxxxxx> <20040314215700.GA61154@xxxxxxxxxxxxxxxxx>
- Reply-to: jos@xxxxxxxxxxx
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'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author