/ Published in: Perl
Expand |
Embed | Plain Text
use Data::Dumper; my $csv = Text::CSV->new ( { binary => 1 } ) # should set binary attribute. $csv->column_names ($csv->getline ($fh)); while ( my $hr = $csv->getline_hr( $fh ) ) { $hash{ $hr->{fieldA} }= $hr->{valueA}; } $csv->eof or $csv->error_diag(); close $fh;
You need to login to post a comment.
