Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: Export CSV v2

by Tux (Abbot)
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2017-04-26 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (471 votes). Check out past polls.