#!/usr/bin/perl # getservers.pl, by Martin Hamilton - martin@mrrl.lut.ac.uk $SITE="site:University of Illinois at Urbana-Champaign"; $SERVER="server:ns.uiuc.edu"; #$MYDOMAIN="uiuc.edu"; $QI="/usr/local/libexec/qi"; $PH="/usr/local/bin/ph"; $A=1; # Use these lines the first time this script is run to add the entries. #$L="$QI <; # might want to add $MYDOMAIN here... $results = "${L}${A}${R}$SITE\n$SERVER\n"; while(){ $results .= $_, next unless /^----------------------------------------$/; $A++; $results .= "\"\nquit\nEOF\n\n"; $results .= "${L}${A}${R}" unless eof(SERVERS); } close(SERVERS); $* = 1; $results =~ s/\n"\n/"\n/g; print $results;