
I need to process csv files that have the characteristics as follows: 1) each file has thousands of columns which have String, Int, and Double types 2) the number of columns may change 3) for those columns whose name do not change, their location may change I want to process some columns in 3) using Haskell. In Perl, I can easily have the code like below: use Text::CSV; my $csv = Text::CSV->new( { allow_whitespace => 1 } ); open my $temp, "<", "temp.csv" or die "Cannot open temp.csv! ($!)"; my @fields = @{ $csv->getline($temp) }; $csv->column_names(@fields); while ( my $hr = $csv->getline_hr($temp) ) { my $sn = $hr->{"UNIT:unitSerialNumber"}; # processing goes here ... } close $temp; Can someone please give me an equivalent code in Haskell? Then I can digest and expand it. Thanks, Hong