#!/usr/bin/env perl
$message_length = `wc -c message.txt`;
if ($message_length == 0) {
    exit;
}
open(SUBJ, "subject.txt");
$subject = <SUBJ>;
chomp $subject;
system "svn update";
open(LIST, "list.txt");
$addressees = '';
while (<LIST>) {
    chomp;
    $addressees .= ' ' . $_;
}
system "mail -s \"$subject\" $addressees < message.txt\n";
system "rm message.txt ; touch message.txt";
exit;
