home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!ftpbox!mothost!merlin.dev.cdx.mot.com!fendahl.dev.cdx.mot.com!mcook
- From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
- Subject: Re: programming challenge
- Message-ID: <mcook.724441713@fendahl.dev.cdx.mot.com>
- Sender: news@merlin.dev.cdx.mot.com (USENET News System)
- Nntp-Posting-Host: fendahl.dev.cdx.mot.com
- Organization: Motorola Codex, Canton, Massachusetts
- References: <1992Dec12.100131.11703@zooid.guild.org> <1992Dec14.114044.22303@cs.ruu.nl> <1992Dec14.185822.7058@wdl.loral.com> <1992Dec15.070653.7276@zooid.guild.org>
- Date: Tue, 15 Dec 1992 17:48:33 GMT
- Lines: 21
-
- Mike Stramba <stramba@zooid.guild.org> writes:
-
- >What I was puzzling over tonight was whether there was a single line 's/'
- >command syntax to delete all '_' characters but not '$_'.
-
- But not '$_'?
-
- >I did it with two lines:
-
- > s/( )_/$1/g; # change ' _' to ' '
- >
- > s/(\w)_/$1/g; # change '\w_' to '\w'
-
- s/\b_//g;
-
- >There probably wouldn't be any advantage to having it in one line ???
-
- If you can say what you mean in one sentence, and you use 10 sentences
- instead, you've just distracted your listener for 9 sentences.
-
- Michael.
-