use strict; undef $/; my $infile = (<>); my @fields = $infile =~ /(".*?"|\n)/gms; my $place = "\n"; foreach (@fields) { if ($place ne "\n" && $_ ne "\n") {print ",";}; unless ($_ eq "\n") {s/\n//g;}; print "$_"; $place = $_; }
In reply to CRLF in a csv by geofisch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |