Sitha Nhok wrote at Thu, 26 Jun 2003 12:47:25 -0400:
> Is there anyway to match a string in a 2-dimensional array only at one
> index? For example, say I have this 2-d array:
>
> @AoA = (
> ["ABC", "BCD"],
> ["CDE", "DEF"],
> ["EFG", "FGH"],
> );
>
> Then I wanted to see if "CD" exist, but only in column index 1
> ($AoA[$row][1]). Is there a way to do this w/o using a "for" loop
> within a "for" loop? Thanks.
[untested]
if (grep /CD/, map {$_->[1]} @AoA) {
...
}
Greetings,
Janek
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]