In any case, you are overwriting @grepnames each time through the loop, so you will only return the matches from the last line of FILEA.
Try push @grepnames, grep... instead.
And use strict and warnings!
In reply to Re: using grep to search an array
by John M. Dlugosz
in thread using grep to search an array
by alicatserver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |