in reply to Printing particular column is not working

The only time you really need to use something special with a CSV file is if a field can contain a comma...
If there are no comma's in the fields you can probably print fields from a .CSV very easily with a one-liner...
perl -ne 'printf("%10s %s \n", (split/,/)[4], (split/,/[0]);' file.csv

Replies are listed 'Best First'.
Re^2: Printing particular column is not working
by fishmonger (Chaplain) on Jul 24, 2014 at 14:02 UTC

    No need for 2 separate split statements.

    perl -ne 'printf("%10s %s \n", (split/,/)[4,0]);' file.csv