use Text::CSV_XS; $c = Text::CSV_XS->new; # use default separator, delimiter,escape or $c = Text::CSV_XS->new(%attr); # set your own separators, delimiters,escapes $c->open_file($filename) # open a CSV file $c->open_string($string) # open a CSV string @row = $c->fetchrow_array # fetch one row into an array $row = $c->fetchrow_hashref # fetch one row into a hashref $table = $c->fetchall_arrayref # fetch all rows into an array of arrays $table = $c->fetchall_hashref($key) # fetch all rows into a hashref $c->write_row( @array ) # insert a row from an array of values $c->write_table($filename,$arrayref) # create a CSV file from an arrayref $c->write_table($filename,$hashref) # create a CSV file from a hashref $c = open_file( $filename ); # loop through a file while(my $row = $c->fetchrow_hashref){ if($row->{$column_name} eq $value){ # do something } }