From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 938 invoked from network); 11 Feb 2006 05:20:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Feb 2006 05:20:58 -0000 Received: (qmail 33360 invoked from network); 11 Feb 2006 05:20:50 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Feb 2006 05:20:50 -0000 Received: (qmail 13362 invoked by alias); 11 Feb 2006 05:20:43 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9913 Received: (qmail 13353 invoked from network); 11 Feb 2006 05:20:42 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Feb 2006 05:20:42 -0000 Received: (qmail 32305 invoked from network); 11 Feb 2006 05:20:42 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 11 Feb 2006 05:20:40 -0000 Received: from candle.brasslantern.com ([71.116.81.225]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IUI0095RC6F6Y73@vms042.mailsrvcs.net> for zsh-users@sunsite.dk; Fri, 10 Feb 2006 23:20:40 -0600 (CST) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id k1B5KcY1005323; Fri, 10 Feb 2006 21:20:38 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id k1B5KcMN005322; Fri, 10 Feb 2006 21:20:38 -0800 Date: Sat, 11 Feb 2006 05:20:37 +0000 From: Bart Schaefer Subject: Re: print entire array *with* subscript? In-reply-to: To: Justin M Wozniak , zsh-users@sunsite.dk Message-id: <1060211052037.ZM5321@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <20060210175012.GA10021@princo> Comments: In reply to Justin M Wozniak "Re: print entire array *with* subscript?" (Feb 10, 11:15pm) On Feb 10, 11:15pm, Justin M Wozniak wrote: } } In your solution, what is the point of (r) ? Subscript Flags --------------- If the opening bracket, or the comma in a range, in any subscript expression is directly followed by an opening parenthesis, the string up to the matching closing one is considered to be a list of flags, as in `NAME[(FLAGS)EXP]'. The flags currently understood are: ... r Reverse subscripting: if this flag is given, the EXP is taken as a pattern and the result is the first matching array element, substring or word (if the parameter is an array, if it is a scalar, or if it is a scalar and the `w' flag is given, respectively). ...