http://qs1969.pair.com?node_id=1020130


in reply to Index of Items in Array using foreach loop

Yes - use the for loop:

for( my $Arrayindex = 0; $Arrayindex <= ( $#SampleArray ); $Arrayindex +++ ) { print $SampleArray[ $Arrayindex ] , ' is at location ' , $Arr +ayindex , ' in the array' , "\n"; }