in reply to Perl AND SQL Help

One thing to try is print out the sql before it gets executed. It is possible that $order is not set how you think and you are executing the SQL without the ORDER BY.