http://qs321.pair.com?node_id=661352


in reply to Re: line by line match on an array of strings
in thread line by line match on an array of strings

May not be the OP's intent???

prints
do me a

Update (after what I judge to have been too many minutes of puzzling over this)

Still not clear why "a" matched (it'll come to me yet), but the obvious cure (IMO) is to anchor the match, thus

if(grep/^$line$/, @typedefs){