use strict; use warnings; use Text::CSV; use Data::Dumper; my $csvFile = <new(); $csv->column_names($csv->getline($fIn)); my $arrayref = $csv->getline_hr_all($fIn); print Dumper($arrayref);