Not a particularly useful program, but I had an assignment a while back in a class to write a program in the language of our choice to count the words in a text file, and print out the 10 most commonly used words. It's not very fast, not very efficient, etc., but was fun to write. After beating the program around for a while, I managed to get it down to: (Updated: removed unnecessary assignment to %a. Thanks merlyn) perl -na0777e 'map {++$a{$_}} @F; print join("\n", (sort { $a{$b} <=> $a{$a} } keys %a)[0..9]), "\n"' And after all that, I didn't even get a very good grade.