title: When accessing individual characters in a string in Perl, is substr or splitting to an array faster?
body: <p>I'm writing a Perl script in which I need to loop over each character of a string. There's a lot of strings, and each is 100 characters long (they're short DNA sequences, in case you're wondering).</p>
  
  <p>So, is it faster to use <code>substr</code> to extract each character one at a time, or is it faster to <code>split</code> the string into an array and then iterate over the array?</p>
  
  <p>While I'm waiting for an answer, I suppose I'll go read up on how to benchmark things in Perl.</p>