in reply to parsing CSV file with embedded commas (fortunately, fixed-width) - is unpack the solution?
Sounds to me like Text::ParseWords will do the trick.
use Text::ParseWords; my @items; while (<>) { push @items, [ quotewords(',', 0, $_) ]; }
It's part of the standard Perl distribution.
--"The first rule of Perl club is you don't talk about Perl club."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re4: parsing CSV file with embedded commas (fortunately, fixed-width) - is unpack the solution?
by tye (Sage) on Nov 01, 2001 at 00:39 UTC | |
by davorg (Chancellor) on Nov 01, 2001 at 03:32 UTC | |
by tye (Sage) on Nov 01, 2001 at 04:02 UTC |