Path: utzoo!attcan!uunet!decwrl!ogicse!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.lang.perl Subject: Re: Counting characters with unix utilities Message-ID: <1990Sep25.171237.17490@iwarp.intel.com> Date: 25 Sep 90 17:12:37 GMT References: <1990Sep25.151014.11935@uvaarpa.Virginia.EDU> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 14 In-Reply-To: worley@compass.com (Dale Worley) In article <1990Sep25.151014.11935@uvaarpa.Virginia.EDU>, worley@compass (Dale Worley) writes: | | X-Name: Randal Schwartz | | perl -ne '$c += tr/A/A/; print $c if eof;' file | | Doesn't this fail if the file is empty? Ooops. I'll be out painting fence-posts for a while, sorry. :-) -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/