LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 1999, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 17 Dec 1999 01:05:59 GMT
Reply-To:   Melvin Klassen <Klassen@UVIC.CA>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Melvin Klassen <Klassen@UVIC.CA>
Organization:   University of Victoria
Subject:   Re: Count the commas (was: Free alternatives to Base/SAS)
Content-Type:   text/plain; charset="us-ascii"

On Thu, 16 Dec 1999 22:59:46, David Cassell <cassell@mail.cor.epa.gov> wrote:

> > > How many lines of SAS code would you need to write a program > > > to read through a file and count the number of commas which > > > were not preceded by a backslash or immediately followed > > > by another comma?

> BTW, my Perl solution was a one-liner on the command line, > perl -0777ne 'print tr/,/,/' your.filename.here > That's all it takes.

But that program doesn't seem to fulfill _all_ of the specifications. How does it _not_ count "backslash/comma" pairs, and _not_ count "double-comma" pairs?


Back to: Top of message | Previous page | Main SAS-L page