Uday,

If Capture::Tiny works for you, then you should use that.

However if you are looking to build a  custom capture of STDIN in your
program a good start is to read the perldocs on

readline <http://perldoc.perl.org/functions/readline.html>  and perlopentut
<http://perldoc.perl.org/perlopentut.html>

Ultimately, there are some pretty tricky things you can do with closures
<http://perldoc.perl.org/perlfaq7.html#What's-a-closure> wrapped as
IO::Callback <https://metacpan.org/module/IO::Callback> classes so perl
will see them as file handles for your redirect of STDIN (don't forget to
return and reset the standard STDIN filehandle when you are done)

Best Regards,

Jed

On Sun, Mar 29, 2015 at 8:29 PM, Uday Shankar Kintali <
udayshank...@email.arizona.edu> wrote:

> Tony, Ron suggested Capture:Tiny, do you have any other ways other than
> what Ron and I talked about. I am also looking at the perl forums Ron
> referred me to.
>
> On Sun, Mar 29, 2015 at 8:26 PM, Uday Shankar Kintali <
> udayshank...@email.arizona.edu> wrote:
>
>> Tony, yeah PHP::Interpreter was wrong. I am now looking at system
>> function, using this I am able to call perl script. Looking if I can pass
>> on the user selected values ( in php form) to the perl script.
>>
>> On Sun, Mar 29, 2015 at 8:20 PM, Tony Cook <t...@develop-help.com> wrote:
>>
>>> On Mon, Mar 30, 2015 at 02:01:25PM +1100, Ron Savage wrote:
>>> > Hi Uday
>>> >
>>> > System is good, but you're much better off using Capture::Tiny with
>>> > a try block managed by Try::Tiny.
>>> >
>>> > Lastly, please refer to https://www.perl.org/ for better way to
>>> > discuss these issues.
>>>
>>> From the first message in this thread:
>>>
>>> Uday Shankar Kintali wrote:
>>> > ... so that I can call a perl script
>>> > from with in a php file.
>>>
>>> which of course means PHP::Interpreter was the wrong answer anyway.
>>>
>>> Tony
>>>
>>
>>
>>
>> --
>> Regards,
>> Uday Shankar Kintali
>> 520-548-9039
>>
>
>
>
> --
> Regards,
> Uday Shankar Kintali
> 520-548-9039
>

Reply via email to