#!/usr/local/bin/perl
# first argument is tab delimited list of rejected papers and email address
# send a file to stdout of the form:
#            send_mail paper_num email_address
# the script send_mail should extract the review and mail it to emai_addr


while (<>) {
	chop;
	($paper_num, $email_addr) = split("\t");
 	$papers{$paper_num} = $email_addr

}


foreach $j (sort keys %papers) {
	if (!$papers{$j}) {
		print "send_mail $j margaret@mojave\n";
	} else {
		print "send_mail $j  $papers{$j} \n";
	}
}