ITYM:
Or you could have $_->[0] =~ $SearchStr - but then your dot would match any character, which is probably not what you intended.my ($grepresult) = grep { $_->[0] eq $SearchStr } @cdata
Update: Added parens as per lodin's comment, as if I hadn't bitten myself twice already today with that oversight ;-)
In reply to Re: find a string in an array of arrays
by Tanktalus
in thread find a string in an array of arrays
by jgatrell42
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |