bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature suggestion: ability to expand a set of elements of an array


From: Oğuz
Subject: Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices
Date: Thu, 27 Jun 2024 08:08:02 +0300

On Thursday, June 27, 2024, Martin D Kealey <martin@kurahaupo.gen.nz> wrote:

> [...]


That's too much to read and Perl is not a good example to follow. Why not
extend the arithmetic expansion syntax to allow generating multiple results
when subscripting indexed arrays? Like `${a[1; 2; 4]}', `${a[3..5; 7]}',
`${a[1..10..3]}', etc. These would expand like `$@' when in double quotes
and like `$*' when being assigned to a variable.



-- 
Oğuz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]