#
# hashref?  Why in the WORLD is the database being kept in a hashref?
#


Oh, it's an exercise for class, and I must keep data in a hashtable, it's
not my fault ^_^

Thanks for your code :)

#
# if you have a small number of columns you want to sort by, build a
# simple subroutine to sort by that column -- this is *FAR SUPERIOR*
# to building a throw-away subroutine and eval-ing it at run time.
#

Sorry if I'm wrong, but it seems that you sort by single columns, and I want
to sort by multiple columns. When I run the script, I want to be free to do
personal sorts, like "first order by color, then by texture, and then by
name" at run time. I want an abstract solution, because I want to cover all
the possibilities... And if I've got lots of columns, I would like not to be
forced to do a subroutine for each column, adding other lots of subroutines
covering the different possibilities between each column
. I have 14 columns in my database... if I do like you said, I have to
code... 14! = 87,000 million subs... That's a lot of subs to code xD.

This is why I've proposed that solution, I want a sort subroutine
independent of number of columns that covers ALL the possibilities of sort
using ANY SET of columns in ANY order. That's my problem ;-)

So, Is there an alternative and more elegant way than mine to do it? (Be
patient, I'm so noob :P)

Thanks.

Sergio.

Reply via email to