title: foreach loop with a condition perl?
body: <p>Is it possible to have a <code>foreach</code> loop with a condition in Perl?</p>
  
  <p>I'm having to do a lot of character by character processing - where a <code>foreach</code> loop is very convenient.  Note that I cannot use some libraries since this is for school.</p>
  
  <p>I could write a <code>for</code> loop using <code>substr</code> with a condition if necessary, but I'd like to avoid that!</p>