Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.unix.questions Subject: Re: edit first line of long file Message-ID: <10096@jpl-devvax.JPL.NASA.GOV> Date: 24 Oct 90 18:40:21 GMT References: <4597:Oct2321:44:2190@kramden.acf.nyu.edu> <590@inews.intel.com> <10201:Oct2404:23:3890@kramden.acf.nyu.edu> <600@inews.intel.com> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 17 In article <600@inews.intel.com> bhoughto@cmdnfs.intel.com (Blair P. Houghton) writes: : (And you really should try perl. I've done things like : this in what I thought was super-tight C code that Larry : Wall then did in three lines of perl; the C took 7 seconds : in one case and the perl took 3. It might even out-cat cat.) Probably not, but it depends on how smart your stdio is, and how dumb your cat is. And of course, it depends on how you write your cat equivalent--the recent addition of direct read and write system calls to Perl could make it a close runner-up in the catting category, but then Sun's cat plays tricks with mmap to do even better, I believe. Of course, you could call syscall(&SYS_mmap, ...) from Perl... Erk. Larry