Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: IPC::Run - can i print the $out before the finish

by gabrielsousa (Sexton)
on Jan 25, 2017 at 23:41 UTC ( #1180350=note: print w/replies, xml ) Need Help??


in reply to Re: IPC::Run - can i print the $out before the finish
in thread IPC::Run - can i print the $out before the finish

manage to make it work, thanks
my ($user,$pass,$host,$in,$out,$err)=('eurotuxftpprod','KujRemebeuj0', +"$ARGV[0]","","",""); use IPC::Run qw( start pump finish timeout ); my @cmd=('lftp', '-u', "$user,$pass", '-e', "open", "$host"); my $h = start \@cmd, \$in, \$out, \$err, timeout( 5 ); $in .= "cls -1\n"; pump $h until $out || $err; # =~ /input/ ; print $out; $out = '' ; $in .= "ls\n"; pump $h until $out || $err; # =~ /input/ ; print $out; $out = '' ; $in .= "mget *\n"; pump $h until $out || $err; # =~ /input/ ; print $out; print $err; finish $h;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1180350]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2021-09-28 16:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?