Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: Export CSV v2

by Tux (Monsignor)
on Oct 09, 2012 at 07:00 UTC ( #997937=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Export CSV v2
in thread Export CSV v2

Don't! Text::CSV_XS and Text::CSV both dynamically support \r \x0D, \n \x0A, or \r\n \x0D\x0A even if they change per line if eol is not specified.

You might want to do so on output though:

print "Writing to file: $ofile_name\n"; $templateTextCopy =~ s{(?: \r\n | \r | \n )} {\r\n}gx; # <-- make line ending consis +tent open my $fh, ">", $ofile_name or die "$ofile_name: $!"; print $fh $templateTextCopy; close $fh;

Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997937]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2016-07-01 03:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (405 votes). Check out past polls.