home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!think.com!ames!sgi!wdl1!wdl39!mab
- From: mab@wdl39.wdl.loral.com (Mark A Biggar)
- Subject: Re: programming challenge
- Message-ID: <1992Dec14.185822.7058@wdl.loral.com>
- Sender: news@wdl.loral.com
- Organization: Loral Western Development Labs
- References: <1992Dec12.100131.11703@zooid.guild.org> <1992Dec14.114044.22303@cs.ruu.nl>
- Date: Mon, 14 Dec 1992 18:58:22 GMT
- Lines: 20
-
- This looks like a job for s.... oops he's dead, oh well how about the
- 's' modifier of the tr command like so:
-
- perl -pie 'tr///cs/;' <files>
-
- which zaps all consecutive chars in the files.
- To limit it to just letters use:
-
- perl -pie 'tr/a-zA-Z//s;' <files>
-
- but of course this doesn't really solve the 'Goofy' problem which doesn't
- have a general solution even with the addition of dictionary lookup because
- word pairs like 'met' vs 'meet'. That problem looks like it take a full
- English understanding AI to solve.
-
- --
- Perl's Maternal Uncle
- Mark Biggar
- mab@wdl1.wdl.loral.com
-
-