|Just another Perl shrine|
parsing csv with Text::ParseWordsby GertMT (Friar)
|on Oct 08, 2009 at 19:57 UTC||Need Help??|
GertMT has asked for the
wisdom of the Perl Monks concerning the following question:
While reading a csv-file I've had some trouble using Text::CSV_XS for a reason that might have to do with eol (re. my post from y'day where Tux and ELISHEVA give me valuable info). That's why I'm trying to use Text::ParseWords but I just can't get to the final stage and was wondering if someone could help me.
I know that there's a lot of 'fields' as I counted them. While trying to print them in an orderly way I get all of them (not orderly and commented out) or just the value of the elements from the first line.
The last line of code obviously doesn't make sense. The fields should be coming from 'every single line', (@lines? and not @fields?)Needless to say I'm not able to use the defined variables.
What am I doing wrong?
I did check some docs on refences and so but all is a bit confusing now.thanks, Gert