#!/usr/bin/perl # burst-python: burst Python mailing-list messages. $border = '--__--__--'; # Find initial from line. while (<>) { $from = $_ if /^From /; last if /$border/; } # Read each message in turn. # This should be called from procmail; # stdout goes to regular mailbox. $/ = "$border"; while (<>) { chomp; last if /End of Python-list Digest/; s/^\n\n*//g; s/\n\n*$//g; s/^Message: [0-9]*\n//g; print "$from"; print "$_\n\n"; } exit (0);