# General csv parser
my $parser = Text::CSV::Simple->new;
my @data = $parser->read_file($datafile);
print @$_ foreach @data;
# Only want certain fields?
my $parser = Text::CSV::Simple->new;
# specify the columns that you want pulled from the csv
$parser->want_fields(1, 2, 4, 8);
my @data = $parser->read_file($datafile);
# Map the fields to a hash?
my $parser = Text::CSV::Simple->new;
$parser->field_map(qw/id name null town/);
my @data = $parser->read_file($datafile);
|