From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,243dc2fb696a49cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!feed.news.tiscali.de!darth-vader.mobilixnet.dk!newsfeed.orangenet.dk!news.hacking.dk!pnx.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: 26 Sep 2004 13:44:10 +0200 Organization: hacking.dk - Doing fun stuff with open source Sender: sparre@sparre.crs4.it Message-ID: References: <338040f8.0409230912.70e3375b@posting.google.com> NNTP-Posting-Host: 80.241.165.48 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: xyzzy.adsl.dk 1096199050 10028 80.241.165.48 (26 Sep 2004 11:44:10 GMT) X-Complaints-To: usenet@news.hacking.dk NNTP-Posting-Date: Sun, 26 Sep 2004 11:44:10 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:4203 Date: 2004-09-26T13:44:10+02:00 List-Id: Eric Jacoboni wrote: > for a_file in ARGF do > for a_line in a_file do > for a_word in a_line.split(/[^A-Za-z]+/) do > count[a_word.downcase] += 1 > end # for a_word > end # for a_line > end # for a_file That's reasonably readable. Probably easier to read than the Bash one-liner that I usually use for this purpose. Maybe it is worthwhile to look a bit at Ruby for text processing. Jacob -- "Any newsgroup where software developers hang out is an Emacs newsgroup."