brentheigold has asked for the wisdom of the Perl Monks concerning the following question:
Say for example I had an array that I created by reading in a file, so:
Then if I wanted to do an ascending sort on the @outputRef array ONLY BY name and phone number, how would I do that? I would really appreciate help on this, if you know how to do this then thanks a lot in advance. Brent.while ( <INPUT_FILE>) { my ($name, $id, $address, $phone) = split(','); push(@outputRef, $name, $id, $address, $phone); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do you specify which fields to sort by when sorting an array.
by chromatic (Archbishop) on Jul 14, 2002 at 22:51 UTC | |
Re: How do you specify which fields to sort by when sorting an array.
by tadman (Prior) on Jul 15, 2002 at 04:37 UTC |
Back to
Seekers of Perl Wisdom