in reply to Index 2D Array
(Output is : Goat index is 2.) It will be "undef" if "goat" is not found.my @a2=map { $array[$_][0] } 0..$#array; my ($goat_idx) = grep{ $a2[$_] eq "goat" } 0..$#a2; print "Goat index is $goat_idx.\n";
"If you had better tools, you could more effectively demonstrate your total incompetence."
|
|---|