title: Reading blocks of text in perl
body: <p>I'm trying to break a page of text into blocks based on a start and end string. I saw a posting on how to do this but for some reason (probably something wrong between the keybd and the chair), I'm not getting any returned rows.</p>
  
  <p>This is that I have so far:</p>
  
  <pre><code>open INPUT, "in.file" || die "Can't find file\n";
  open OUT, "&gt;log.out" || die "Can't opne file\n";
  
  
  $start="\/\*";
  $stop= "\/\=";
  $found=0;
  
  while (&lt;INPUT&gt;) 
   {
   if (/$start/ .. /$stop/) 
    {
    next if /$start/ || /$stop/;
    if ($found == 0)
     {
     print "NOT FOUND\n";
     }
    else
     {
     print "FOUND\n";
     }
    }
   }
  </code></pre>
  
  <p>We'll use this as an example of what I'm reading in:</p>
  
  <p>/*  Batch process 1 - abc
  ...
  ..
  .
  /=</p>
  
  <p>/* Batch process 2 - jkl
  ...
  ..
  .
  /=</p>
  
  <p>/* Batch process 3 - xyz
  ...
  ..
  .
  /=</p>
  
  <p>Before anyone comments, yes I am a newbie at programming in general so apologies for simple errors here. I did go on line and check for samples but to no avail. Again apologies if this this is an elementary question.</p>