in reply to perl group by and sort from a csv input file
Let me just go ahead and gather a few more down-votes by saying that, in this case, all of you came up with the wrong answer, then started debating the details of databases and drivers (or not). The fundamental mistake was this:
“Let me write a computer program for you.”
You can actually do the whole damned job, soup to nuts, in Microsoft Excel, or any spreadsheet of your choice, provided only that you know about the concept of queries. MS-Excel can actually do simple queries against a spreadsheet file. It also supports database files, although generally it uses the successor to the old JET Engine (MS-Access). So, they don’t have to engage the IT Department and wait six months for their requirement to bubble-up to the top of their list.
The person who brought the original requirement to the programming team probably did not realize that s/he could use a spreadsheet to tackle the entire problem without writing – or, thereafter, maintaining – a
Perl computer program at all. They can achieve their business task without engaging anyone from IT, while IT does not need to write, debug, and maintain a computer program to accomplish what a simple query can do. (And, thanks to visual query builders, they don’t have to understand SQL at all.)
They’ll have lots of different ways that they’ll want to massage their data, and, once they have been empowered to do it themselves by gaining a little depth-of-knowledge of what the tool in their hands can actually do, they can now go off and do it. By themselves.
The very best computer program is the one that you don’t have to write.