Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing CSV file ?s
by vladb (Vicar) on May 17, 2002 at 03:05 UTC | |
However, having said that, let me try by pointing you to a few Perl modules that were designed to help programmers like yourself deal with CSV data. Here are a few good ones: Sorry, Anonymous Monk, but that's about everything I could help you with... Reply to this post if you need any further help, though ;) _____________________
| [reply] [d/l] |
|
Re: Parsing CSV file ?s
by greenFox (Vicar) on May 17, 2002 at 03:08 UTC | |
| [reply] | |
by hossman (Prior) on May 17, 2002 at 07:52 UTC | |
| [reply] [d/l] |
|
Re: Parsing CSV file ?s
by krujos (Curate) on May 17, 2002 at 08:32 UTC | |
Its hard to answer your question, since you never really say what you want do with the last line. This will get you all of the values into an array
If you want to mess with the last field more you can match say $fields[@fields-1] Or if you want to just mess with the last field and nothing else try this...
The regexp could use work... but thats your job. ps, dont you loose the bullets when you take the file out of .xls (I am assuming the file was created from excel, but I could be wrong :) )? | [reply] [d/l] [select] |
|
Re: Parsing CSV file ?s
by dsheroh (Monsignor) on May 17, 2002 at 14:46 UTC | |
Not tested, but the basic structure of 'read a line, split it if there are commas, append it to the last field if there aren't' should be applicable in some form. | [reply] [d/l] |
|
Re: Parsing CSV file ?s
by mrbbking (Hermit) on May 17, 2002 at 15:07 UTC | |
| [reply] [d/l] |