Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post

    Including result from Perl into PHP

    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>
    Last edited by Grant Palin; 11-06-2003 at 04:32 AM.

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    for PERL or other CGI stuff look at http://www.php.net/virtual
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post
    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?

  • #4
    New Coder
    Join Date
    Jun 2002
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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....

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •