in reply to Fasten up NGram generation code?

While this won't be faster, you can replace the entire loop with the following one-liner:
"_${_}_" =~ /(.{1,5})(?{$$ngram {$^N} ++})(?!)/ for @large_wordlist;

Abigail