Re: RFC 120 (v2) Implicit counter in for statements, possibly $#.
[email protected] ("David L. Nicol") Fri, 18 Aug 2000 16:58:51 -0500
| Newsgroups | perl.perl6.language.flow |
|---|---|
| Organization | University of Missouri - Kansas City supercomputing infrastructure |
| Message-ID | <[email protected]> |
Mike Pastore wrote:
>
> On 18 Aug 2000, Ariel Scolnicov wrote:
>
> > Actually, this suggests that C<values @array> should return
> > C<(@array)> (a copy of the values), and C<keys @array> the list
> > C<(0..$#array)>. But those aren't very useful.
>
> I like the proposed syntax! I also think that C<keys @array> would be
> useful, I often use arrays as integer-based lookups (like for database
With sparse arrays, keys (@ayy) would give you the indices of the ones that
are defined
What is this discussion doing in -flow, anyway?
And the syntax for directly accessing an array element's last known
array index is ${element:n} -- it might give you the key that was
used to find it in a hash too, but not so sure.
--
David Nicol 816.235.1187 [email protected]
Does despair.com sell a discordian calendar?