#!/usr/local/bin/perl 

local($expression, $count, $sw);
local(@words, @selected);
local($wordpath);

$wordpath = "/htdocs/personal/pborwein/BOOK/PROTECTED/Indexing/src/words.idx";

$expression = $ARGV[0];
$expression =~ s/\*/\.\*/g;

open(WORDS, "words.idx");
@words = <WORDS>;
close(WORDS);

@selected = grep(/$expression/, @words);

$count = @selected;

if ($count > 0){
	print "<UL>";
	foreach $sw (@selected){
		chop $sw;
		print "<LI> <A HREF SRC=>$sw</A>\n";

	}
	print "</UL>";
}


