Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!snorkelwacker!bloom-beacon!athena.mit.edu!ccount From: ccount@athena.mit.edu (Craig A Counterman) Newsgroups: comp.lang.perl Subject: sort Summary: Is this possible? Keywords: sort Message-ID: <1990Feb1.050145.21183@athena.mit.edu> Date: 1 Feb 90 05:01:45 GMT Sender: news@athena.mit.edu (News system) Reply-To: ccount@athena.mit.edu (Craig A Counterman) Distribution: usa Organization: Massachusetts Institute of Technology Lines: 17 I am a convert to perl, thanks to the Perl Reference Guide, and a2p and s2p. I used the programs to convert a series of awk and sed scripts to perl, and the ref. card to understand the code and fine tune the result. It works great. One thing I'd like to do but don't yet see how (if it's possible), is to sort the lines of a file based on a given field. My actual application would be a bit more complex, but that's the basic idea. sort() would sort a single array, but I think I need it to also generate an index array I could then use to reference the other arrays. (I'd read and split each line in the file into a series of arrays, one column per array and visa versa, do some processing, and then want to sort on one of the arrays). Thanks, Craig