in reply to Matching words

use List::Util 'all';