[Chicago-talk] Removing Characters

tiger peng tigerpeng2001 at yahoo.com
Mon Oct 22 07:52:33 PDT 2007


Hello,

There must be better way for removing the double quote in a CSV file optionally quoted by double quote.
What I did as below is ugly and not reliable. Could anyone provide one beautify line?

  $delimiter=chr(0227);
  s/^"/$delimiter/g;
  s/,"/,$delimiter/g;
  s/"$/$delimiter/g;
  s/",/$delimiter,/g;
  s/"//g;
  s/$delimiter/"/g;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/chicago-talk/attachments/20071022/16d5e8ba/attachment.html 


More information about the Chicago-talk mailing list