On Mon, 17 Jan 2005 14:41:40 +0100, Mauro <[EMAIL PROTECTED]> wrote: > I'm trying to create a little form usign CGI.pm but I get this error from > apache: > malformed header from script. Bad header=<form method="post" action="/c: > /usr/lib/cgi-bin/make_graph_CPU_form.pl.cgi > > this is my perl code: > > #!/usr/bin/perl > use CGI qw/:standard/; > > sub print_form { > print start_form, > "Metriche:", > checkbox(-name=>'usr',-checked=>1), > checkbox(-name=>'sys',-checked=>0), > checkbox(-name=>'wio',-checked=>0), > checkbox(-name=>'idle',-checked=>0), > reset(-name=>'Reset'), > submit(-name=>'Go!'), > end_form; > }; > > print header, > start_html('RRDTool CPU Usage Monitor'), > h1('RRDTool CPU Usage Monitor'), > print_form(), > "Nothing to it!\n", > end_html;
Replace the above with: ## start headers print header, start_html("foo"), h1("bar"); print_form(); ## end html print end_html; The problem is that print_form() is evaluated to early in the code or something :) Tor -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>