#!/usr/bin/perl -w use strict; use warnings; use Text::CSV; binmode STDOUT, ':utf8'; my $csv = Text::CSV->new ({ binary => 1 }) or die "Cannot use CSV: ".Text::CSV->error_diag(); $csv->eol("\n"); sub ee { my ($s) = @_; $s =~ s/&/&/g; $s =~ s/</g; $s =~ s/>/>/g; return $s; } print <<'End';