# code4lib.pl - subscribe to a mailing list called code4lib
# Eric Lease Morgan <[log in to unmask]>
# Usage: perl code4lib.pl
# 2003/12/09 - first cut
# For more information see:
#
# http://dewey.library.nd.edu/mailing-lists/code4lib/
# Alternatively send an email message to [log in to unmask]
# and in the body of the email message put:
#
# sub code4lib [INSERT YOUR NAME HERE]
# define the location of your mailer
$MAILER = '/bin/mail';
######################################################
# no configuration should be necessary below this line
# check for interested-ness
if ( &interested ) { &subscribe }
# done
exit;
#############
# subroutines
sub interested {
# print a blurb
print <<EOB;
The purpose of code4lib is to provide a forum for discussion
of computer programming in the area of libraries and
information science. Subscribers are welcome to discuss the
application of particular programming languages and to
discuss the general issues, techniques, philosophies, and
even history of programming for and in libraries. There are
other venues such as web4lib, xml4lib, perl4lib, but this
list hopes to encourage the holistic use of programming
languages, and to provide useful discussion on how to select
the right tool for your particular job. Hopefully everyone
will learn a thing or two along the way...
For more information see:
http://dewey.library.nd.edu/mailing-lists/code4lib/
EOB
# ask about interested-ness
print 'Are you interested in subscribing? [y|n] ';
$a = <STDIN>;
chop $a;
if ($a eq 'y') { return 1 }
}
sub subscribe {
# prompt for name
print 'What is your name? ';
$n = <STDIN>;
chop $n;
# do the work
open MAIL, "| $MAIL [log in to unmask]";
print MAIL "subscribe code4lib $n";
close MAIL;
}
|