http://www.perlmonks.org?node_id=1196436


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.”

Wrong.

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.

  • Comment on Re: perl group by and sort from a csv input file

Replies are listed 'Best First'.
Re^2: perl group by and sort from a csv input file
by Corion (Pope) on Aug 01, 2017 at 11:36 UTC

    Of course, in your long running, and certainly successful career as a consultant, you have never encountered a task that was worth automating.

    Hence, while touting your approach as a solution, you cannot weigh it against the perpetual cost of manually triggering the conversion macro every time and against the cost of getting an Excel macro to run unattended without a logged in user.

    Please don't offer your bad advice on topics where you don't know anything.