#!/afs/athena/contrib/perl/p

open(IDX, "/afs/sipb/user/mkgray/windex/index");

while(<IDX>){
    split(';;', $_);
    for $n (1..$#_){
	$Index{$_[$n]} .= "$_[0];;";
    }
}


while(1){
    $req = (<STDIN>);
    chop($req);

    if($Index{$req}){
	@sites = split(';;', $Index{$req});
	print("The following sites contain relevant information:\n");
	for $s (@sites){
	    print("$s\n");
	}
    }
    else{
	print("I don't think so\n");
    }

}
