Help for this page

Select Code to Download


  1. or download this
     my $aoa = csv (in => "test.csv") or
         die Text::CSV_XS->error_diag;
    
  2. or download this
     my $aoa = csv (  in => "test.csv", sep_char => ";");
     my $aoh = csv ({ in => $fh, headers => "auto" });
    
  3. or download this
     my $aoa = csv (in => "file.csv");
    
     open my $fh, "<", "file.csv";
    ...
    
     my $csv = [ [qw( Foo Bar )], [ 1, 2 ], [ 2, 3 ]];
     my $err = csv (in => $csv, out => "file.csv");
    
  4. or download this
     my $aoh = csv (in => $fh, headers => [qw( Foo Bar )]);
     csv (in => $aoa, out => $fh, headers => [qw( code description price }
    +]);
    
  5. or download this
     use Text::CSV_XS qw( csv );
     my $aoh = csv (
         in       => "test.txt",
    ...
         fragment => "row=3;6-9;15-*",
         );
     say $aoh->[15]{Foo};