John McNamara <[EMAIL PROTECTED]> writes:

> As far as I can see the current consensus is as follows:
>      1. Implicit variable: nice but not really worth the trouble.
>      2. Explicit variable between foreach and the array: might conflict
>         with other proposals.
>      3. Explicit counter in the body of the for/each loop: a clean
>         solution but requires a new or reused function.

What happened to the --nice, elegant and sparse array friendly--
extension of each/keys/values?

  for ( ($i,$v) = each(@a) ) {
    print "Value $v at index $i\n";
  }

  foreach ( keys @a ) {
    print "Value $a[$_] at index $_\n";
  }

-- Johan

Reply via email to