in reply to Re: Sorting array
in thread Sorting array

Maybe, if you can guarantee you want to sort by a value that's coming from your database. If you want to allow the user to specify the column to sort on and you create columns that are derivatives (such as percentages), then you have to sort in Perl.

Oh - and sorting in Perl can occasionally be more efficient than sorting in the database. The reason is that, depending on the implementation, the database will sort by copying the values from one section of memory to another. Perl sorts by moving pointers around. With larger datasets, Perl's way could be faster.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested