Hi - > -----Original Message----- > From: kevin r [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 30, 2003 8:06 AM > To: [EMAIL PROTECTED] > Subject: Sorting Help!!! > > > Hello, > > I am having problems with the sort routine. I am writing a script that > parses very large firewall logs. At one point during the script I end up > with a very large array containing all of the destination udp and > tcp port > numbers. This array can be up being over 100,000 entries. I am > trying to > sort with the following: > > @sortedPortArray = sort(@portArray); > > It works, but I could crawl up under my desk and take a nap > before it will > finish. Is there a faster way to sort? Thank you in advance for > your help. > > > Kevin >
It looks as though you may be thrashing in memory - the swap file on disk. The quick fix might be to upgrade your processor memory. The REAL fix is to load the entries into a database (like mysql) and proceed with SQL queries. I don't think the perl sort was ever designed to handle millions and millions of bytes of data... Aloha => Beau. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]