> On Tue, 25 Jun 2002, Jaclyn Whitehorn wrote: > >> Basically, you need to avoid printing ANYTHING to stdout. One way of >> doing >> it is having a variable $output: >> >> my $output; >> $output .= $q->header(-type => 'application/x-www-form-urlencoded'); >> $output .= "key1=foo&key2=blah&key3=etcetc\n"; >> return $output; > > That won't work. You can't append headers to output in CGI::Application. > Instead, use the header_props() method: > > sub mode1 { > my $self = shift; > $self->header_props(-type => 'application/x-www-form-urlencoded'); > return "key1=foo&key2=blah&key3=etcetc\n"; > } > > -sam >
Argh. That was dumb of me. Shouldn't post untested code ... ((And another dumb thing -- private reply. I just joined, so hopefully I won't do *that* again...)) Anyway, use the append to $output if you have more than just one or two lines (other than the header) to return. Mea culpa .. Jaclyn --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/cgiapp@lists.vm.com/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]