Back to the main page

Mailing List Logs for ShadowRN

From: Brian Rogers <rogers@****.UIUC.EDU>
Subject: Re: Admin Discussion in ShadowTK
Date: Wed, 5 Oct 1994 20:47:08 -0500
I must say, that was some ugly PERL code. Here is mine -->


#!/usr/local/bin/perl

$tempfile = "/tmp/shadowrun";
$DEST = "SHADOWTK@*****.nic.SURFnet.nl";

print "Key Word (PRIVATE, NOT TO) -- >";
$kw = <STDIN>;
chop($kw);
$kw =~ tr/a-z/A-Z/; #upper case everything

print "Name List (P = those allowed to read / NT = not not allowed) \n";
print "(separated by white space) --> ";
$kl = <STDIN>;
chop($kl);

# Still haven't debugged why I get only 1 word subjects...will look
# into it later.

print "\nSubject --> ";
$sub = <STDIN>;
chop($sub);
$subj = "-subject $sub";

print "\nType in your Character's Name --> ";
$yourchar = <STDIN>;
chop($yourchar);

$EDITOR = $ENV{"VISUAL"} || $ENV{"EDITOR"} || "vi";
$PAGER = $ENV{"PAGER"} || "more";

open (OUT, "> $tempfile") || die ("WHOOOPS");

print OUT "***** ($kw): $kl\n";
print OUT ">>>>>[ ]<<<<<";

close (OUT) || die ("Whoops");

system $EDITOR, $tempfile;

# Damn this is MUCH cleaner (I must be a stud....nah)

system("date '+ -- $yourchar <%H:%M:%S / %m-%d-55> %n' >>
$tempfile");

system("mail $subj $DEST </tmp/shadowrun");
system "delete /tmp/shadowrun";



It DOES work (its what I use) but its not the greatest.

Disclaimer

These messages were posted a long time ago on a mailing list far, far away. The copyright to their contents probably lies with the original authors of the individual messages, but since they were published in an electronic forum that anyone could subscribe to, and the logs were available to subscribers and most likely non-subscribers as well, it's felt that re-publishing them here is a kind of public service.