Next Program Repair Shop 116

C-style for Loop

     my @lib = @$lines;
     # This for loop does not allow return until each sub is finished
     for ($j=0; $j < @lib; $j++) {
       # Reading the first delimiter line and 'Title' line altogether
       if ($lib[$j]=~/^\#[\-_]{50,}/ ) { 
         next;
       } elsif ( $lib[$j]=~/^(\#+ *title *: *([\w\-\.]+))/i ) {
         $long_subname=$1;  $sub_name=$2; $title_found=1;
         if ($sub_name=~/\.pl$/) {
           next;
         }                         ## to avoid the very first headbox
         $out_subs{"$sub_name"}{'title'}="$sub_name";
         ...
       }
       ...
     }



Next Copyright © 2002 M. J. Dominus