but then your dot would match any character
You could do \Q...\E to quote the metacharacter.
my ( $grepresult ) = grep { $_->[0] =~ m{\Q$SearchStr\E} } @cdata;
Cheers,
JohnGG
Update: I also missed the scalar/list problem, parentheses added. lodin ++
In reply to Re^2: find a string in an array of arrays
by johngg
in thread find a string in an array of arrays
by jgatrell42
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |