...

View Full Version : Including result from Perl into PHP



Grant Palin
11-06-2003, 05:21 AM
How can I include the result of a Perl script into PHP? I tried using include, but that gave me the text of the script itself, and not the result.

And to get a result from the script, do I have to explicitly return some value? Or can I just reference a variable in the script?

<edit>I should clarify a bit. I want the script to print something on the page; would I be able to have PHP call the Perl script to do it's thing, then resume PHP? Or should I just return a value from the script and have PHP print that?</edit>

firepages
11-07-2003, 12:35 AM
for PERL or other CGI stuff look at http://www.php.net/virtual

Grant Palin
11-07-2003, 08:25 PM
Whoo! That stuff was alittle over my head! I'm just starting out in PHP. Maybe I should try just doing what I want to do in PHP rather than calling a seperate Perl program to do it. Can you use PHP to make changes to files?

Socraties
11-07-2003, 08:29 PM
Just about anything you can do in PERL, you can also do in PHP. You can make all kinds of changes to files using PHP. Reading, writing, appending, sorting, searching, etc....

Grant Palin
11-07-2003, 10:01 PM
All right, I'll give that a try then. I wrote the seperate perl program just to practice a little, but I guess it's complicating things more than necessary.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum