Using while and for statement to check if you had typed in four letter words
while (<>) { for (split) { if (/^\w{4}$/) { print "You shouldn't use four letter words.\n"; } } }