home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / info / info_pc.arc / mkind < prev   
Text File  |  1990-08-22  |  1KB  |  40 lines

  1. #! /usr/bin/perl
  2. $newdigest = 1 ;
  3. while (<>)
  4.     {
  5.     $instr[0] = $_ ;
  6.     @whitegrep = grep (/^[ \t\n]*$/, @instr);
  7.     if ($#whitegrep >= 0)
  8.         {
  9.         if ($newdigest)
  10.             {
  11.             $volser = $possible_volser;
  12.             }
  13.         $newdigest = 0;
  14.         if (length ($subjtext) > 0)
  15.             {
  16.             print $ARGV , " ", $volser , ": " , $subjtext ;
  17.             }
  18.         $subjtext = "";
  19.         }
  20.     @grepstr = grep (/^From:.*[iI][nN][fF][oO].*[pP][cC]/, @instr) ;
  21.     @grepstr2 = grep (/^From:.*Gillmann/, @instr);
  22.     if ($#grepstr >= 0 || $#grepstr2 >= 0)
  23.         {
  24.         $newdigest = 1 ;
  25.         }
  26.     @subjgrep = grep (/^Subject:.*Digest.*V.*#/, @instr) ;
  27.     if ($#subjgrep >= 0)
  28.         {
  29.         $subjgrep[0] =~ s/V[0-9]* *#[0-9]*/\\\\$&\\\\/ ;
  30.         @grepsplit = split (/\\\\/, $subjgrep[0]);
  31.         $possible_volser = $grepsplit[1];
  32.         }
  33.     @grepstr = grep (/^Subject:/, @instr) ;
  34.     if ($#grepstr >= 0)
  35.         {
  36.         $subjtext = $instr[0];
  37.         $subjtext =~ s/^Subject:// ;
  38.         }
  39.     }
  40.