<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># This -*- perl -*- script makes the rplyto_demo script
# $Id: rplyto_demo.PL,v 1.2 1997/01/16 20:43:35 gbarr Exp $

$script = "./rplyto_demo";

use Config;
use Cwd;
unlink($script);
open MIR, "&gt;$script" or die "open for writing $script: $!";
print MIR $Config{'startperl'}," -w\n";
$cwd = Cwd::getcwd();
#print MIR "use lib qw($cwd/blib);\n";
print MIR &lt;DATA&gt;; 
chmod(0755, $script);

__DATA__
use Mail::Internet;

$mail = Mail::Internet-&gt;new([&lt;&gt;]);
$rply = $mail-&gt;reply(Keep =&gt; [qw(Newsgroups)]);

$file = "/tmp/reply.$$";

open(REPLY,"&gt;$file") || die "Cannot open $file:$!\n";

$rply-&gt;print(\*REPLY);

close(REPLY);

$editor = $ENV{"EDITOR"} || die "\$EDITOR not defined\n";

warn "$editor :$!\n" if (system("$editor $file"));

# Cleanup
unlink($file,$file . '%',$file . '~');

exit 0;


</pre></body></html>