6 |
|
# A perl script that mimmicks the behaviour of the UKC |
7 |
|
# mailinfo client. Supports all functions except the -C |
8 |
|
# option to change mailstore. |
9 |
< |
# - T.D.Bishop@ukc.ac.uk |
9 |
> |
# - T.D.Bishop@kent.ac.uk |
10 |
|
# |
11 |
|
# $Author$ |
12 |
|
# $Id$ |
87 |
|
PeerAddr => $server, |
88 |
|
PeerPort => $port, |
89 |
|
Proto => 'tcp' |
90 |
< |
) or die "Connection to server broken"; |
90 |
> |
) or die "Connection to server broken\n"; |
91 |
|
|
92 |
|
if(!defined $sock) { |
93 |
< |
print "Connection to server broken"; |
93 |
> |
print "Connection to server broken\n"; |
94 |
|
exit(1); |
95 |
|
} |
96 |
|
|
107 |
|
|
108 |
|
# send the query |
109 |
|
print $sock "$mode $name\n"; |
110 |
+ |
$response = ""; |
111 |
|
|
112 |
|
# read and print the response |
113 |
|
while($response ne ".\n") { |