I made a CGI that must send a piece of code to screen, otherwise, must
return a redirect command (is a banner CGI)
What it is stange to me is that the construction:
# ....blah, blah above
#
# Returns code or redirect to the page
print ($str_codetoreturn)
? $cgi_this->header().$str_codetoreturn
: $cgi_this->redirect(-uri=>$str_redirecto);
#
# end of cgi
sends a "premature end of headers" error; but:
# ....blah, blah above
#
# Returns code or redirect to the page
if ($str_codetoreturn)
{ print $cgi_this->header().$str_codetoreturn; }
else
{ print $cgi_this->redirect(-uri=>$str_redirecto); }
#
# end of cgi
works fine.
($cgi_this is my CGI object)
Why is this?
TIA,
J. Alejandro Ceballos Z. |
-------------------------------+------------------------------
http://alejandro.ceballos.info |
[EMAIL PROTECTED] |
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>