in reply to Configuration of Sambar server to use Perl

A page not found error is generally related to the webserver. Check where your form is actually submitting to. As an unrelated note about style, it's probably better to use
print header();
instead of
print "content-type: text/html\n\n";
That way you're sure you'll get a proper header.