Word frequency count FIXED by murky-satyr

[set f foreach] w [set l [regsub -all {[!-`~]} [string tol [read stdin]] ""]] {set a($w) 1}
$f w\ _ [array get a] {lappend t $w}
$f w [lsort $t] {puts [llength [lsearch -all $l $w]]\ $w}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page