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