for(my $i=0;$i < scalar(@{$object_ref->{array_ref});$i++){ # I need the index! }