go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It would look something like this:
Check out sort for the full story. And, you'd probably have to maintain some kind of global setting for the sub (indicating which columns to sort by) or call the sub from the sort block indicating it there. Although, calling functions from the sort block can get surprisingly slow. The worst case is O(n*log(n)) I believe and calling functions in perl is among the slowest thing it does. I'm sure you'll figure it out. UPDATE: NetWallah, sorry, no bugs here. This was not intended to be a complete solution. What's the fun in having someone else write it all out for you? -Paul In reply to Re: How would I sort a two-dimensional array by multiple columns?
by jettero
|
|