s">]</span><span class="s1">&#39;</span>
      <span class="nv">enddo</span>
   <span class="nv">enddo</span>

<span class="k">end</span> <span class="nv">program</span> <span class="nv">demo_chomp</span>
</code></pre></div>

<p>sample input file</p>
<div class="codehilite"><pre><span></span><code><span class="w"> </span><span class="nt">this</span><span class="w"> </span><span class="nt">is</span><span class="w"> </span><span class="nt">a</span><span class="w"> </span><span class="nt">test</span><span clas