in reply to unicode string comparison (perl 5.26)

Parsing CSV with regular expressions (or split, which is using regular expressions) is brittle and error-prone. Think nested quotes, separators and newlines, but also Unicode.

Even if using a real CSV parser, like Text::CSV_XS or Text::CSV, looks like overkill, it will probably safe you hours of pulling hairs later on.

The two mentioned modules will deal with Unicode quite well, so you probably will not see any of these issues anymore.

my $csv = Text::CSV_XS->new ({ binary => 1, auto_diag => 1, sep_char = +> $separator}); while (my $row = $csv->getline ($fh)) { $row->[-1] =~ m/^\s*([0-9]+)\s*\z/ or warn "Last field of row ", $csv->record_number, " is not numer +ic: '$row->[-1]'\n"; }

Enjoy, Have FUN! H.Merijn