puzzled?? exec perl script
| From: | Sonia Tsui | Date: | Fri, 29 Sep 2000 22:10:27 +0000 |
| Subject: | puzzled?? exec perl script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-18128@lists.php.net to get a copy of this message | ||
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