Yes - use the for loop:
for( my $Arrayindex = 0; $Arrayindex <= ( $#SampleArray ); $Arrayindex +++ ) { print $SampleArray[ $Arrayindex ] , ' is at location ' , $Arr +ayindex , ' in the array' , "\n"; }
In reply to Re: Index of Items in Array using foreach loop
by tmharish
in thread Index of Items in Array using foreach loop
by default_user
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |