in reply to parsing CSV file with embedded commas (fortunately, fixed-width) - is unpack the solution?

chomp $line; my @record = split /','/, $line; substr($record[0],0,1) = ''; chop $record[-1];
I threw in a variety of functions to enjoy.

After Compline,
Zaxo

  • Comment on Re: parsing CSV file with embedded commas (fortunately, fixed-width) - is unpack the solution?
  • Download Code

Replies are listed 'Best First'.
Re: Re: parsing CSV file with embedded commas (fortunately, fixed-width) - is unpack the solution?
by amelinda (Friar) on Oct 31, 2001 at 22:59 UTC
    Hm. Close. I thought of that too. But that breaks on at least one field which is not enclosed with 's.