in reply to Index in For loop

How about this:
for my $i (0 .. $#list){ print "index = $i"; print "value = $list[$i]"; }