From: Bart Schaefer <schaefer@brasslantern.com>
To: ZSH User List <zsh-users@sunsite.dk>
Subject: Re: how to force scalar to be an array?
Date: Fri, 27 Aug 2004 14:27:36 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.61.0408271416370.4189@toltec.zanshin.com> (raw)
In-Reply-To: <20040827154905.GA26846@spiegl.de>
I'm sorry, I missed the second (result="foo") assignment when I was trying
the examples, so I thought you always had a multi-word scalar to start
with. Ignore my previous message.
A scalar is a scalar, and the result of splitting a scalar is only an
array if the split actually does something.
Further, using $=array forces the array to be a scalar and then applies
the preceding rule.
So your only safe bet is to actually assign the scalar to an array, and
then use subscripting on the array.
next prev parent reply other threads:[~2004-08-27 21:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-27 15:49 Andy Spiegl
2004-08-27 21:15 ` Bart Schaefer
2004-08-27 21:27 ` Bart Schaefer [this message]
2004-08-28 7:43 ` Andy Spiegl
2004-08-28 18:08 ` Bart Schaefer
2004-08-30 16:39 ` Andy Spiegl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.61.0408271416370.4189@toltec.zanshin.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).