Webmaster wrote:
>
> (I have attached a prototype of what I had in mind)
>
> From: "David L. Nicol" <[EMAIL PROTECTED]>
> > Yes, that is exactly what is being suggested, but the "indexof" function
> > is implicit in the attribute. Your code becomes
> >
> > print "Found It at position ${_:n}!\n" if /$seek/ foreach @items
>
> I do like the iterator, but I also prefer:
> " split( /$delim/, $items[$index] );"
> To
> " split( /$delim/, $items[${_:n}]);"
> for readability.
yes. I imagine :n would be used in debugging code, where you don't
really need it for the general meaning of the passage.
$items[$_:n] # curlies only are required for interpolation
I didn't say it so many words, but an example of how to _access_ an
attribute inside interpolation -- that is what I was getting at too;
> The two might actually be able to work together, if ':n'
> was an element of the actual array, whereby a subsequent call to the array
> index function using 'null' or 'undef' as the starting index would pick up
> where it left off. The other part is that the array index function could
> potentially return a list. (see attached)
>
> It's only a suggestion, and I have programmed long enough to do it other
> ways (see attached), but if RFC 199 doesn't fly, this would be nice to have
> around.
> Grant M.
> [EMAIL PROTECTED]
it's not a member, but an attribute, thus the colon. The curlies are
only needed because we're inside double-quotes in my example.