I need to do some commands in another machine, I will try something like
'rlogin machine'. 

I'm not allowed to install new packages in the machine :'(

To simplifey I tried to run a simple command in perl to simulate a
'more' command.

use IPC::Open2;
use IO::Handle '_IOLBF';

My $pid = open2(my $RDRFH, my $WTRFH, "perl", "-e", "while (<>)
{print}");

print "print 0\n"; 
print $WTRFH "1\n"; 
print "print 1\n"; 
print $WTRFH "2\n"; 
print "print 2\n"; 
print $WTRFH "3\n"; 
print "print 3\n"; 

IO::Handle::flush($WTRFH);

while(<$RDRFH>) {
    print;
}; 

close $RDRFH;
close $WTRFH;

##################################

The loop:

while(<$RDRFH>) {
    print;
}; 

Don't do nothing. What Am I doing wrong?



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to