freq = {} while gets() for word in $_.split('/\s/') printf("%s\n",word) end end