B
Bob Van Der Ploeg
How can I get perl to sort an array based on the second value inthe array?
example
@array=(201,1,635,4,987,3,407,2);
^ ^ ^ ^
Result I want is (201,1,407,2,987,3,635,4);
Would this be easier to sort if it were a multi-demsional array?
@array=([201,1],[635,4],[987,3],[407,2])
If so how do I sort a multi-demensional array?
Thanks,
Bob
example
@array=(201,1,635,4,987,3,407,2);
^ ^ ^ ^
Result I want is (201,1,407,2,987,3,635,4);
Would this be easier to sort if it were a multi-demsional array?
@array=([201,1],[635,4],[987,3],[407,2])
If so how do I sort a multi-demensional array?
Thanks,
Bob