$ cat 1204245.csv foo,bar,baz,qux fred,barney,wilma,betty apple,orange,banana,pear #### use strict; use warnings; use feature 'say'; use Text::CSV_XS; my $csv = Text::CSV_XS->new({ binary => 1, auto_diag => 1 }); open my $fh, '<', './1204245.csv' or die "Died: $!"; my @column = map { $_->[2] } @{ $csv->getline_all( $fh ) }; say for @column; __END__ #### $ perl 1204245.pl baz wilma banana