perl -e 'chomp(@l=(<*>));open(FH,"){for $w(@l){/\b$w\b/ ? print: next}}'