Find words whose first and last three letters are equal

# 20210210 Raku programming solution

my ( \L, \N, \IN ) = 5, 3, 'unixdict.txt';

for IN.IO.lines { .say if .chars > L and .substr(0,N) eq .substr(*-N,*) }

Output:

antiperspirant
calendrical
einstein
hotshot
murmur
oshkosh
tartar
testes

Last updated