It looks like you need to either use a hash, or if the keys repeat then use an array of arrays.
for my $arr2(@arr2) {
You are not using the $arr2 variable anywhere so why are you declaring it? You are iterating over the elements of the array but are using indexing instead so your for loop should look like this instead:
for ( my $j = 0; $j <= $#arr2; $j += 4 ) {
$seen = substr($arr2[$j], 0);
That is the same as saying:
$seen = $arr2[$j];
In reply to Re: Iterating two co-dependant arrays
by jwkrahn
in thread Iterating two co-dependant arrays
by ww
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |