Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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


Comment on Re^4: Export CSV v2
Select or Download Code

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 lurking in the Monastery: (11)
As of 2014-10-01 12:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (13 votes), past polls