Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re (tilly) 1: Resorting to Sorting

by tilly (Archbishop)
on Dec 01, 2001 at 04:00 UTC ( #128799=note: print w/replies, xml ) Need Help??


in reply to Resorting to Sorting

Very nice. I would only add a few more.

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 File::Sort. And I have a personal fondness for using the BTREE option of DB_File to maintain a sorted data structure.

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://128799]
help
Chatterbox?
[marto]: cpanmini get you started ?
[marto]: Err minicpan
[atcroft]: floutenvy: I assume you have looked at this already?
[hippo]: marto++
[atcroft]: floutenvy: I assume you have read this already...?
[atcroft]: (Sorry, all, my connection flapped while I was loading the page, causing a resend.)
[marto]: My to do list contains a companion tool, but at the moment I use minicpan with a basic config file, tar up the output and transfer it to the secure network

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2018-08-17 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (181 votes). Check out past polls.

    Notices?