in reply to Re^8: Perl custom sort for Portuguese Lanaguage
in thread Perl custom sort for Portuguese Lanaguage
The meta info knows whether the field was quoted or not.
True, though AFAICT the meta_info doesn't seem to keep track of escaped characters:
use warnings; use strict; use Data::Dump; use Text::CSV; my $csv = Text::CSV->new({ binary=>1, auto_diag=>2, keep_meta_info=>1, escape_char=>"\\" }); while ( my $row = $csv->getline(*DATA) ) { dd $row, $csv->meta_info; } $csv->eof or $csv->error_diag; __DATA__ foo,bar "#foo","bar" #foo,bar \#foo,bar
|
|---|