You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2000/12/19 14:16:03 UTC

Re: A strange array .. bug?

Hi!
>
> Well, it's not that easy to describe my problem...
>
>
> It don't really matter what I program, because the main problem is just a
push into an array. When I call my page nothing happens and it's like a
never-ending-loop until I stop apache. If I place a "die" in front of it,
the page dies correctly, but when I set it after the mysterious push
nothing's happening like before.
>

I am not quite sure if I understand your problem, but "die" in an Embperl
only terminates the current block, so the [$ foreach $curpid @memberpids $]
will still run to the end. If you really want to terminate the whole page
you have to use "exit". On the other side from my point of view, there is no
need to split these loops into several blocks. Put it all in one block and
use only Perl loops (maybe you have short the example and it makes sens in
the long version). This may make it easier to debug. If it still doesn't do
what you expect, then put

print LOG "some text....\n" ;

inside your loops, the output goes to the embperl.log file and you can watch
what your code really does.

Hope this helps

Gerald

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------