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,delims,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 fetching hashrefs while(my $row = $c->fetchrow_hashref){ if($row->{$column_name} eq $value){ # do something } } There are two interfaces to this module, the new interface (shown above) has convenient shortcuts, the older interface is for backwards compatibility for previous users. B: in the new interface binary mode defaults to true, whereas in the older interface it defaults to false. This means that the new interface methods will, by default, handle embedded newlines and binary characters, whereas if you want that behaviour with the old methods, you must manually set binary=>1 in the call to new().