#!/usr/bin/perl
#
&parse_form;
foreach $name (keys %lookup) {
$file = $name;
}
if ( $file != "(\w+)\.html" ) {
&suicide("I'm sorry the URL $file is invalid.");
}
open (INPUT, "$file") || &suicide ("Sorry.");
while () {
$input .= $_;
}
close(INPUT);
$input =~ s||
http://www.hrw.org/wr2k3/$file
|g;
$input =~ s|||g;
$input =~ s||
Human Rights Watch World Report 2003|;
$input =~ s| MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0"||;
$input =~ s|
||; $input =~ s|\t | ([\n\r ]+)([\n\r ]+) | ((.*)[\n\r ]+)+ |
||; open(output, '>-'); print(output "Content-type: text/html\n\n"); print(output $input); close(output); exit; sub suicide { local($error_text) = @_; print "Content-type: text/html\n\n"; print"