note
tilly
Very nice. I would only add a few more.<p>
If you are working with a database, it is often worthwhile to move the sort out of Perl and into an SQL statement. Likewise when handling files in a Unix environment it is sometimes best to just resort to the Unix sort utility. Another external "sort this file" module to play with is [cpan://File::Sort]. And I have a personal fondness for using the BTREE option of [cpan://DB_File] to maintain a sorted data structure.<p>
These are all worth knowing about, but moving sorts into SQL is particularly effective for saving headaches. While sorting the output yourself may be a fun demonstration of complex Perl manipulations, the database is likely to be faster, and (particularly if you are sorting on dates!) is likely to save headaches.
128722
128722