You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Nicolas Parody <in...@nicodev.com> on 2000/06/27 22:38:50 UTC

Why can't I use print?

Hi, I don't understand why this doesn't work as I expected it. Is there
another
way of doing this?
------------------------------------------------------------------------    [-
print "hello" -]  
------------------------------------------------------------------------ the
output is:
------------------------------------------------------------------------
hello  
------------------------------------------------------------------------ Is
there a way for the print output to appear where I placed it, i.e between the
BODY tags? I know that this case is not very realistic, but there definitely
are situations when I will have to use print or similar. Thanks, Nico

RE: Why can't I use print?

Posted by jb...@team-linux.com.
First, you should really use: [+ "Hello" +]

If, for some reason, you really need to use print then take a look at the
embperl options. I think the one you want to set in your httpd.conf is
OPT_REDIRECT_STDOUT or something like that.

On 27-Jun-2000 Nicolas Parody wrote:
> Hi, I don't understand why this doesn't work as I expected it. Is there
> another
> way of doing this?
> ------------------------------------------------------------------------   
> [-
> print "hello" -]  
> ------------------------------------------------------------------------ the
> output is:
> ------------------------------------------------------------------------
> hello  
> ------------------------------------------------------------------------ Is
> there a way for the print output to appear where I placed it, i.e between the
> BODY tags? I know that this case is not very realistic, but there definitely
> are situations when I will have to use print or similar. Thanks, Nico
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org

-- 
Jason Bodnar + jbodnar@team-linux.com + Team Linux

Herb:   I want you to help me design a car.  A car for all the Homer
        Simpsons out there!  And I want to pay you two hundred thousand
        dollars a year!

Homer:  And I want to let you!

                   Oh Brother, Where Art Thou?


RE: Why can't I use print?

Posted by Wim Kerkhoff <wi...@netmaster.com>.
On 27-Jun-2000 Nicolas Parody wrote:
------------------------------------------------   
> [- print "hello" -]  

You need to do [- print OUT "hello" -] instead.

Check http://perl.apache.org/embperl/ for examples of this.

Regards,

Wim Kerkhoff, Software Engineer
NetMaster Networking Solutions
wim@netmaster.com