home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!cs.utexas.edu!convex!convex!tchrist
- From: Tom Christiansen <tchrist@convex.COM>
- Subject: Re: class negation broken - OR - what am I doing wrong ?
- Originator: tchrist@pixel.convex.com
- Sender: usenet@news.eng.convex.com (news access account)
- Message-ID: <1992Sep10.001625.17567@news.eng.convex.com>
- Date: Thu, 10 Sep 1992 00:16:25 GMT
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- References: <1992Sep9.134920.2169@robcad.uucp>
- Nntp-Posting-Host: pixel.convex.com
- Organization: Convex Computer Corporation, Colorado Springs, CO
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 18
-
- From the keyboard of ronys@calisto.robcad.uunet (Rony Shapiro):
- :I'd expect the following perl one-liner to print all characters except 'f':
- :
- : perl -n -e 'print if /[^f]/' file
- :
- :However, ALL of the characters are printed.
-
- Right -- your lines have two characters, one of which
- is a newline, which your [^f] matched.
-
- Add -l for auto chop and appending of \n.
-
- --tom
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
- But you have to allow a little for the desire to evangelize when you
- think you have good news.
- --Larry Wall in <1992Aug26.184221.29627@netlabs.com>
-