Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!oliveb!orc!mipos3!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.lang.perl Subject: Re: grep as apply (was Re: = @array?) Message-ID: <1990Feb23.232353.4071@iwarp.intel.com> Date: 23 Feb 90 23:23:53 GMT References: <15193@bfmny0.UU.NET> <100197@convex.convex.com> <1990Feb23.190455.2653@iwarp.intel.com> <7158@jpl-devvax.JPL.NASA.GOV> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 17 In-Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) In article <7158@jpl-devvax.JPL.NASA.GOV>, lwall@jpl-devvax (Larry Wall) writes: | Er, note that he's adding to @array in place. The selection only applies | to the returned array value. If he'd said | | @array = grep($_ += 3, @array); | | then you'd be righter. Urrg. Does that mean I lose my Official Perl Hackers Club membership? I hope not! @a=split(/X*/," ,JPacehklnorstu");print@a[2,15,13,14,0,4,10,11,14,7,6,12,0,3,6,12,9,0,7,4,5,8,6,12,1]; -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/