FFRANK has asked for the wisdom of the Perl Monks concerning the following question:
Walking through @AoA, I would like the AoA index $i $j to be reported for the first occurence to in the second array is not zero.my @AoA = ( [ '1', '2', '10' ], [ '3', '4', 5' ], [ '6', '8', '11' ], [ '0', '7', '9' ], ); my @A = qw(0 0 0 0 1 2 0 0 1 0 1 0);
Store $i, $j for the first occurence of@AoA[$i][$j] = $index;
Thanks, best.@A[$index] !=0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Control loop 2D array
by BrowserUk (Patriarch) on Jun 16, 2007 at 17:25 UTC | |
by ysth (Canon) on Jun 17, 2007 at 09:13 UTC | |
by BrowserUk (Patriarch) on Jun 17, 2007 at 11:36 UTC | |
by ysth (Canon) on Jun 17, 2007 at 16:54 UTC | |
by BrowserUk (Patriarch) on Jun 17, 2007 at 18:59 UTC | |
|
Re: Control loop 2D array
by ysth (Canon) on Jun 17, 2007 at 09:12 UTC |