Majordomo Digests to mbox format for MHonarc (perl script)

1998-01-04 21:44:47

        I've searched the archives for some brain dead simple way of bring in 
digests so that MHonarc can use them, and couldn't find anything but some 
references to procmail and -msgsep...nothing which seemed to work "easily"...

        So, here is my contribution...a simple, brain dead script that takes a
Majordomo digest and converts it to a format that can be used by MHonarc...
I don't guarantee it, but if anyone can suggest what is wrong with it, I'd
like to know and try to fix it

        Just run it as: <scriptname> <infile> > <outfile>

Marc G. Fournier                                
Systems Administrator @ 
primary: scrappy(_at_)hub(_dot_)org           secondary: 

$userid = getlogin();

$ii = 0;
while (<>) {
  if($printline) {
    $line{$ii} = $_;
(/^----------------------------------------------------------------------/) {
    $printline = 1;
    $line{$ii} = "------------------------------";

for($jj = 0; $jj < $ii; $jj++) {
  if(/^------------------------------/, $line{$jj}) {
    if($line{$jj+2} =~ "^Date:") {
      print "From $userid\n";
      $jj += 2;
    } else {
      if($line{$jj+2} =~ "^End of") {
  print $line{$jj};

<Prev in Thread] Current Thread [Next in Thread>
  • Majordomo Digests to mbox format for MHonarc (perl script), The Hermit Hacker <=