App-csvtool

 view release on metacpan or  search on metacpan

bin/csvtool  view on Meta::CPAN

      my $path = shift @ARGV;
      my $fh;
      $path eq "-" ? $fh = \*STDIN
                   : open( $fh, "<", $path ) || die "Cannot read $path - $!";
      my $csv = new_csv();
      push @args, sub { $csv->getline( $fh ) };
   }
}

if( $toolpkg->can( "WANT_OUTPUT" ) and $toolpkg->WANT_OUTPUT ) {
   my $csv = new_csv( eol => $/ );
   push @args, sub { $csv->print( \*STDOUT, $_[0] ) or die "Cannot print - $!" };
}

push @args, @ARGV;

$toolpkg->run( @args );

__END__

=head1 NAME



( run in 1.537 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )