I think you haven't thought about this enough. Jim doesn't have a number, he has two. The print above will work in the for loop example I gave in my first reply:
for ( grep { $_->[0] eq $name } @names ) { print $_->[1]; }
In reply to Re^7: check if an element exists in array
by FunkyMonk
in thread check if an element exists in array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |