my $csv= text::CSV_XS->new ({ binary => 1, allow_whitespace => 1, auto_diag => 1 }); #### allow_whitespace When this option is set to true, whitespace (TAB's and SPACE's) surrounding the separation character is removed when parsing. If either TAB or SPACE is one of the three major characters "sep_char", "quote_char", or "escape_char" it will not be considered whitespace. #### strip If set, "ReadData ()" will remove trailing- and/or leading- whitespace from every field. strip leading strailing ----- ------- --------- 0 n/a n/a 1 strip n/a 2 n/a strip 3 strip strip