> $csvLine =~ s/(".+?),(.+?")/$1|$2/g;

For some reason this substitution does not seem to work all the time,
depending on which fields have commas in them.

I finally tinkered my way into this:
  $csvLine =~ s/("[^",]+?),([^",]+?")/$1|$2/g;

...which seems to work a little better, but will not deal with spaces
between fields, which are not supposed to be there anyway.

Barry Brevik


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to