monger has asked for the wisdom of the Perl Monks concerning the following question:
Today, I come with a question for the sages here. I have been given a project that has mixed perl and PHP scripts. I have a problem making one thing work now: a perl script passing some info to a PHP script. The way it was originally written was this:
`$MODULE::PROGS/variable_setup.sh $MODULE::PROGS/myscript.php 'data=$_ +[1]' > $file$_[1].$ext`;
When I pass this to PHP, it is agnostic of the variable passed to it. The variable "$_[1]" comes from the following:
open (IN,"$MODULE::INFO/data_file.txt"); foreach (<IN>) { split;
Everything on the perl side works fine. The perl debugger has been great. I've posted the same question to a PHP forum and had less than helpful responses. So, what wisdom do the monks have here? I am a bit stuck because the variable "$_[1]" will actually have a total of 10 elements as it is iterated through. So, can one assign an array to an environment vairable that PHP could then read? Assigning the data to an Apache variable? Other suggestions?
Thanks,
monger
Edited by Chady -- escaped [ to prevent linking.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl and PHP playing together
by bart (Canon) on Nov 29, 2004 at 19:15 UTC | |
|
Re: Perl and PHP playing together
by saberworks (Curate) on Nov 29, 2004 at 19:15 UTC | |
|
Re: Perl and PHP playing together
by superfrink (Curate) on Nov 30, 2004 at 05:09 UTC | |
|
Re: Perl and PHP playing together
by sweetblood (Prior) on Nov 29, 2004 at 19:04 UTC | |
by jimbojones (Friar) on Nov 29, 2004 at 19:27 UTC | |
by sweetblood (Prior) on Nov 29, 2004 at 20:09 UTC |