Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: sort Keywords: sort Message-ID: <6963@jpl-devvax.JPL.NASA.GOV> Date: 1 Feb 90 20:21:48 GMT References: <1990Feb1.050145.21183@athena.mit.edu> <1990Feb1.163539.10576@iwarp.intel.com> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Distribution: usa Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 18 In article <1990Feb1.163539.10576@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes: : # now @indicies has the pointers into @whole for the sorted array : for (@indicies) { : print $whole[$_]; : } : # larry? is that the same as 'print @whole[@indices];'? Assuming you haven't diddled the $, variable, and that you have enough memory to throw the whole array on the stack, and that you spell the name of the array consistently, yes. And bearing in mind that it might be more efficient to use the sort program. : Just another Perl hacker, of sorts, Now that he's collecting examples for the book, he's also a sorter of hacks. Larry