ok.
package Everything::Parser;
use Apache;
use Apache::Constants;
use CGI qw(escape);
sub handler {
my $r = shift;
open(FILE, $r->filename) or return NOT_FOUND;
$_ = join("", <FILE>);
s/\[([^\]]+)\]/build_link($1)/egs;
print $r->send_http_header("text/html");
print;
}
sub build_link {
my $node = shift;
$escaped_node = escape($node);
return "<a href='http://everything2.com/?node=$escaped_node'>$node</a>";
}