In article <[EMAIL PROTECTED]>, Yanick <[EMAIL PROTECTED]> wrote: > You provide the course, I smack the balls.
I prefer (at least sometimes) to see golf worked out interactively, on the list. Here's a hole: A file has 0 or more fields on each line. Fields are separated by 1 or more whitespace characters. Leading and trailing whitespace should be ignored. Comments (starting with # and continuing to the end of the line) should be ignored. A field may have surrounding double-quotes. Such a field may contain # or whitespace (but not "). The surrounding quotes are themselves not part of the field. Any other use of a " has no special meaning (e.g.: howdy, "partner# foo is a line with two fields, 'howdy,' and '"partner'). Read the file and print the fields of each line separated by ':'. I'll post my (far from optimal, I'm sure) solution in a little while.