"be consistent" | |
PerlMonks |
Re: Re: Re: csv to flat-fileby Bilbo (Pilgrim) |
on Nov 28, 2002 at 09:35 UTC ( [id://216264]=note: print w/replies, xml ) | Need Help?? |
OK. In the substitution replace the comma witha newline character: s/,/\n/g; The split solution could become:
($, = "\n"; sets the character used to separate entries when print is used to print an array, as returned by split) As pointed out, all these solutions fail if any entries can contain a comma, in which case you should investigate the modules suggested elsewhere. I was assuming that since the format of your example was simple you would not have such complex data.
In Section
Seekers of Perl Wisdom
|
|