Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!swrinde!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.jpl.nasa.gov (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Split problem Message-ID: <1991May2.180142.5201@jpl-devvax.jpl.nasa.gov> Date: 2 May 91 18:01:42 GMT References: <11112@bunny.GTE.COM> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 21 In article <11112@bunny.GTE.COM> hhg1@gte.com (Hallett German) writes: : : am using perl 3.041 under Ultrix. : : The program produces an output file listing the messages received for : a given newsgroup. Split works fine for a few hundred records but not : a few thousand in that the c++ newsgroups are not included. (A kludge : is done to get by grep). How can I get it to work correctly: I vaguely recall having fixed some bug like this having to do with splitting on #--you might try an up-to-date version. : if (index($ngroup,"c++") >= 0) { : ($ngroup) =~ s/c\++/cplusplus/; : } Nitpick. The index() is superfluous if you quote the pattern right: $ngroup =~ s/c\+\+/cplusplus/; Larry