newbie using POST

Rafael A Calvo (rafa+@cs.cmu.edu)
Fri, 12 Mar 1999 19:24:33 -0500 (EST)


Hi,

I'm using the following code (almost the example in lwpcook)

--------------------------------------
use LWP::UserAgent;
$ua = new LWP::UserAgent;
...
my $req = new HTTP::Request
'POST','http://myserver/cgi-bin/kNN_demo.pl';
$req->content_type('application/x-www-form-urlencoded');
$req->content("DataBase=$DataBase&Title=$title&Abstract=$Abstract&OptionK=$K&OptionN=$N");
my $res = $ua->request($req);
print $res->content;
---------------------------------------

The HTML ouput seems ok, but when I run it from the browser it says 

-------------------
"malformed header from script. Bad
header=:/usr4/rafa/public_html/cgi-bin/post.pl"
--------------------
the output was:
-------------------------
kNN on

kNN (k-Nearest-Neighbours) on

Your query:

Title:
Abstract:
Keywords:
KNN Results: Top 0 Categories
RankingCategory NameWeighting


rafa@cs.cmu.edu
---------------------------

What am I doing wrong?
cheers,

Rafael


------------------------------------------------------------------------------
office: +1 412 268-2088 : Fax:+1 412 268-6298 : Home:  +1 412 361-3698
http://www.cs.cmu.edu/~rafa