push @{ (/PAT/) ? @match : @nonmatch }, $_ foreach @words;