in reply to Re: ideas on how to improve existing code
in thread ideas on how to improve existing code
I'm not sure where you get the "perl parsing method" idea from as my sample code in reply to the OP is a minor refactoring of the OP's code. It uses $csv->parse ($line) to parse individual lines from the file as does the OP's code.
However, despite the OP's proffered guess that the code may be inefficient, the plea in the title of the node is "ideas on how to improve existing code" which I addresses by pointing to maintenance and reliability related good coding practises. People seem to get hung up about "efficiency" issues without any need at all to make the code execute more quickly. Maintenance and reliability are generally much more important. If the OP were not using a module for parsing csv already I'd recommend using a module just from the point of view of saving programmer time and making the code more reliable and maintainable - "efficiency" is generally completely irrelevant!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: ideas on how to improve existing code
by Tux (Canon) on Aug 29, 2011 at 22:58 UTC |