#!/usr/bin/perl -w use IO::File; use Text::CSV_XS; my $csv = Text::CSV_XS->new( { sep_char => ',' } ); my $io = IO::File->new( 'data.txt', '<' ) or die "Can't read file: $!\n"; my $number = 10; # which number to start with? until ( $io->eof ) { my $row = $csv->getline($io); print "Olah:","\t", $number++ , "\t", $row->[2], " ", "\"", $row->[5], "\"", "\t", "\"", $row->[3], $row[0], "\"", " ", $row->[4], "\n"; }