<div class="gmail_quote">On Sat, Jul 2, 2011 at 4:35 PM, Adam Tauno Williams <span dir="ltr"><<a href="mailto:awilliam@whitemice.org">awilliam@whitemice.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
String splitting is an evil and wrong way to read a delimited record;<br>
doing so will fail in a fantastic variety of ways. I'm not a Perl<br>
developer but I'm certain Perl must provide a standard module for<br>
reading delimited data sets. In Python this would be the "csv" module -<br>
which allows you to specify field delimiter, line terminator, and field<br>
quoting style. Don't forget that text files also have encoding - one<br>
cannot assume text data is ASCII (especially if a user can get anywhere<br>
near it using cut-n-paste). If it isn't straight-ASCII your string<br>
splitting will fail in mysterious cases that on visual inspection look<br>
fine.<br>
<br>
--<br>
<font color="#888888">Adam Tauno Williams<br></font></blockquote><div><br></div><div>+1 </div><div><br></div></div>-- <br> Ben Rousch<br> <a href="mailto:brousch@gmail.com" target="_blank">brousch@gmail.com</a><br> <a href="http://clusterbleep.net/" target="_blank">http://clusterbleep.net/</a><br>
<br />--
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
<br />believed to be clean.