open a program in perl, write to it and then obtain its output

Hi,

I'm trying to open a program in Perl (say the R language). I'd like to be able to send code to this other program once it launches, and then gather the output back in Perl. Is there some way to do this?

Thanks very much.

L.

Comments

  • : I'm trying to open a program in Perl (say the R language). I'd like
    : to be able to send code to this other program once it launches, and
    : then gather the output back in Perl. Is there some way to do this?
    :
    Yes; check out this from the Perl docs:
    http://perldoc.perl.org/perlipc.html#Bidirectional-Communication-with-Another-Process

    Jonathan
    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion