App-CSVUtils
view release on metacpan or search on metacpan
script/tsv2csv view on Meta::CPAN
#!perl
use 5.010001;
use strict;
use warnings;
use Text::CSV_XS;
use Text::CSV_XS::TSV;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2025-02-04'; # DATE
our $DIST = 'App-CSVUtils'; # DIST
our $VERSION = '1.036'; # VERSION
binmode STDIN, ':encoding(utf8)';
binmode STDOUT, ':encoding(utf8)';
my $csv = Text::CSV_XS->new({binary=>1});
my $tsv = Text::CSV_XS::TSV->new({binary=>1});
while (my $row = $tsv->getline(\*ARGV)) {
$csv->combine(@$row);
print $csv->string, "\n";
}
# ABSTRACT: Convert TSV to CSV
# PODNAME: tsv2csv
__END__
=pod
=encoding UTF-8
=head1 NAME
tsv2csv - Convert TSV to CSV
=head1 VERSION
This document describes version 1.036 of tsv2csv (from Perl distribution App-CSVUtils), released on 2025-02-04.
=head1 SYNOPSIS
% tsv2csv INPUT.tsv > OUTPUT.csv
=head1 DESCRIPTION
B<Common notes for the utilities:>
Encoding: The utilities in this module/distribution accept and emit UTF8 text.
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/App-CSVUtils>.
=head1 SOURCE
Source repository is at L<https://github.com/perlancar/perl-App-CSVUtils>.
=head1 SEE ALSO
L<csv2tsv>
Other CSV-related utilities in L<App::CSVUtils>.
Other TSV-related utilities in L<App::CSVUtils>.
L<App::TextTableUtils>
L<App::SerializeUtils>
=head1 AUTHOR
perlancar <perlancar@cpan.org>
( run in 0.886 second using v1.01-cache-2.11-cpan-39bf76dae61 )