# Read file from path my @rows; my $csv = Text::CSV->new ( { binary => 1, sep_char => "\t" } ) or die "Error creating TSV object: ".Text::CSV->error_diag (); open my $fh, "<:encoding(utf8)", "$filename" or die "Error reading CSV file: $!"; $csv->column_names ($csv->getline ($fh)); # Get header names while ( my $record = $csv->getline_hr( $fh ) ) { # Process record push @rows, $record; } $csv->eof or $csv->error_diag(); close $fh; print Dumper \@rows; #### $VAR1 = [ { 'ID' => '4564', 'Date' => '4-05-1986, 'Name' => 'Mengano' } ];