Re: CVS_XS Module
- From: gandalf100@xxxxxxxxx
- Date: 28 Jan 2006 11:36:23 -0800
Tnx,
i'll better know how to read the manual next time.
BTW print to $fd raised 2 errors(i did it before i asked..)
cya
Xavier Noria כתב:
> On Jan 28, 2006, at 9:06, itzik brown wrote:
>
> > #!/usr/bin/perl -w
> > use strict;
> > use Text::CSV_XS;
> > use IO::File;
> >
> > my $csv = Text::CSV_XS->new();
> > my $fd = new IO::File;
> > open $fd,">","out.csv" or die "can't open file for writing\n";
> >
> > my @cols = ('cow','dog','bar');
> > $csv->print($fd,\@cols);
> > @cols = ('1','2','bar');
> > $csv->print($fd,\@cols);
> >
> > close $fd;
> >
> > My Question:
> > How Do i put new lines between the lines in the csv files?
>
> Reading both the docs (which are not very clear in this regard) and
> the source code, the solution within the module API is:
>
> my $csv = Text::CSV_XS->new({ eol => "\n" });
>
> -- fxn
.
- References:
- CVS_XS Module
- From: Itzik Brown
- Re: CVS_XS Module
- From: Xavier Noria
- CVS_XS Module
- Prev by Date: Re: CVS_XS Module
- Next by Date: Learning Perl - the Good and the Bad (Tutorials, Habits, and Tools, etc)
- Previous by thread: Re: CVS_XS Module
- Next by thread: Re: CVS_XS Module
- Index(es):
Relevant Pages
|
|