Re: Re: puzzled?? exec perl script

From: Date: Sun, 01 Oct 2000 14:54:45 +0000
Subject: Re: Re: puzzled?? exec perl script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-18205@lists.php.net to get a copy of this message
simple code...^______________^;; Sorry. I am poor at english. ++++++++++++++++++++++++++++++++++++++++++++++++ $result_array = explode ("\n", perl hello.pl); ~~~ ~~~ +++++++++++++++++++++++++++++++++++++++++++++++ Concentrate on backtick mark ( ` ). Kim. On Sun, 1 Oct 2000, peter strzygowski wrote: > hello sonia, > > i tried nearly the same thing some days ago, > > >Suppose I have a perl script 'hello.pl' > >--------------------------------------- > >foreach($i=0; $i<5; $i++) { > > print "hello\n"; > >} > >--------------------------------------- > > > >In my 'hello.php', i just call the perl script > >------------------------------------------------- > >exec("perl hello.pl", $result_array); > >for ($i=0; $i< count($result_array); $i++) { > > echo "$result_array[$i]<br>"; > >} > >------------------------------------------------- > > > >I expect to see 5 hellos, but then I only get one, how do I get around > >with this?? > > > >--- Sonia > > maybe the solution is, that exec() did return only the last (or the first?) > line of the result. > if you use system() you will get the whole result. > > hth > peter strzygowski > > S C R E E N G A R D E N informationsdesign > www.screengarden.de > dipl-ing. peter strzygowski > torstr. 177 - 10115 berlin > tel 030 - 962 02 600 > fax 030 - 962 02 602 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#18205) next »