I think you're looking for passthru (or perhaps system or exec). If your php
is like this:

<?php passthru ("/tmp/hello.pl yay") ?>

and hello.pl is like this:

#!/usr/bin/perl
print 'Args:'.join(' ', @ARGV);

Your web page will read:

Args:yay

You'll probably need to change the method of input (to use @ARGV instead of
<>) on your Porter stemmer program to make it work properly.

J

-- 
Julian Wood

Multimedia Developer
University of Calgary


on 3/5/01 11:53 PM, Matt Friedman at [EMAIL PROTECTED] wrote:

> I'm stumped. I've searched all over and can't figure this one out.
> 
> I have a perl script that waits for input on the command line. You type in a
> string and it returns a string.
> 
> I'd like to be able to this via php, since I can't rewrite the script in php,
> since it's a little over my head.
> 
> So, how do I open the perl script in php, send it some input and read the
> output?
> 
> Thanks,
> Matt.
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to