"Christopher J. Madsen" wrote:

> Why not use an explicit counter instead?  Something like
> 
>   foreach $item $index (@array) {
>  
> (This is a syntax error in Perl5.)


Why not use an explicit perl5 counter?

        my $index;
        foreach $item (@array){ $index++;
                print $item, " is at index ", $index, "\n";
        }

Reply via email to