title: Use Oracle PL/SQL For Loop to iterate through comma delimited string
body: <p>I am writing a piece of code that would need to iterate on the content of a string, each values being separated with a <code>,</code>.</p>
  
  <p>e.g. I have my <code>elements</code> </p>
  
  <pre><code>v_list_pak_like varchar2(4000) := 'PEBO,PTGC,PTTL,PTOP,PTA';
  </code></pre>
  
  <h2>How can I get it into an Array / Cursor to iterate on it in my loop?</h2>
  
  <pre><code>for x in (elements)
  loop
     -- do my stuff
  end loop;
  </code></pre>
  
  <p>I am looking for the very simple way, if possible avoiding to declare associative arrays. </p>
  
  <p><strong>Would it be possible to create a function</strong> that would return something usable as an input for a <code>for</code> loop (opposite to the while that could be used like in <a href="https://stackoverflow.com/a/19184203/6019417">https://stackoverflow.com/a/19184203/6019417</a>)?</p>
  
  <p>Many thanks in advance.</p>