On Mon, 13 Jun 2005 21:20:26 -0500, J. Alejandro Ceballos Z. wrote: Alejandro,
the problem here is that you are evaluating a PRINT function for its results but not the string. Perl needs to print, to evaluate the print function, thus the writing of the header is prematurely ended. You want the following: $str_codetoreturn ? print $cgi_this->header().$str_codetoreturn : print $cgi_this->redirect(-url=>$str_redirectto); /oliver/ > What it is stange to me is that the construction: > print ($str_codetoreturn) > ? $cgi_this->header().$str_codetoreturn > : $cgi_this->redirect(-uri=>$str_redirecto); > sends a "premature end of headers" error; but: > if ($str_codetoreturn) > { print $cgi_this->header().$str_codetoreturn; } > else > { print $cgi_this->redirect(-uri=>$str_redirecto); } > works fine. -- "If you believe everything you read, you better not read." -Japanese Proverb -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>