title: splitting on pipe character in perl
body: <p>I have a little problem. I want to split a line at every pipe character found using the split operator. Like in this example. </p>
  
  <pre><code>echo "000001d17757274585d28f3e405e75ed|||||||||||1||||||||||||||||||||||||" | \
  perl -ane '$data = $_ ; chop $data ; @d = split(/\|/ , $data) ; print $#d+1,"\n" ;'
  </code></pre>
  
  <p>I would expect an ouput of 36
  as <code>awk</code> splitting with the delimiter <code>|</code> return 36, but instead I get 12, as if the split stopped at the <code>1</code> character in the line.</p>
  
  <pre><code>echo "000001d17757274585d28f3e405e75ed|||||||||||1|||||||||||||||||||||||||||||||||||||||" | \ 
  awk -F"|" '{print NF}'
  </code></pre>
  
  <p>Any idea. I have tried many ways of quoting the <code>|</code>, but without success. 
  Many thanks by advance.</p>