in reply to Re: Code for elegance, code for clarity
in thread Code for elegance, code for clarity
Tilly, I apologize if you were tempted into more than a cursory glance at my sample code. As I told Podmaster, I wasn't intending to debate the merits of this code. If I wanted a thorough attack for CSV files, I'd go download a CPAN module.
First, ++ to you for /\G"/cg. One of the reasons I love posting things here is to increase my understanding of the language and learn more tricks such as this one that I had not stumbled across in the documentation before.
Let me respond to your individual points:
Yes, this code will cost plenty of extra CPU cycles. It is based on an inherently flawed approach of having two statements chew down a string for different reasons. I'd never use it in production if resources were scarce or execution speed was important.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Code for elegance, code for clarity
by dws (Chancellor) on Jan 12, 2004 at 18:41 UTC | |
|
Re: Re: Re: Code for elegance, code for clarity
by tilly (Archbishop) on Jan 13, 2004 at 16:36 UTC | |
|
Re: Re: Re: Code for elegance, code for clarity
by perrin (Chancellor) on Jan 12, 2004 at 18:34 UTC | |
by ysth (Canon) on Jan 12, 2004 at 19:52 UTC |