borisz has asked for the wisdom of the Perl Monks concerning the following question:
I tried a filter option to new filter => sub { local $_ = shift; s/\s+$/\015\012/; $_ } and local $\ = "\015\012";package MyXSV; use base 'Text::xSV'; sub format_row { my $csv = shift; my $row = $csv->SUPER::format_row(@_); $row =~ s/\n$/\015\012/; $row; } 1; ... while ( $res->fetch ) { $csv->print_row( $city_id, $alias_id, $alias ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: set lineendings in Text::xSV
by dragonchild (Archbishop) on Apr 07, 2006 at 12:00 UTC | |
by Limbic~Region (Chancellor) on Apr 07, 2006 at 12:25 UTC | |
|
Re: set lineendings in Text::xSV
by graff (Chancellor) on Apr 08, 2006 at 07:43 UTC | |
by borisz (Canon) on Apr 10, 2006 at 07:45 UTC | |
|
Re: set lineendings in Text::xSV
by cdarke (Prior) on Apr 07, 2006 at 10:01 UTC | |
by borisz (Canon) on Apr 07, 2006 at 10:41 UTC | |
by cdarke (Prior) on Apr 07, 2006 at 11:04 UTC | |
by aquarium (Curate) on Apr 07, 2006 at 11:59 UTC |