in reply to feeding stdin of executed command and store stdout in $var

See IPC::Open3 or IPC::Open2, and also perlipc.

Maybe you want to look at Net::FTP instead.

Also, soon you will be Suffering from Buffering, especially with a subprocess whose output you don't control.

  • Comment on Re: feeding stdin of executed command and store stdout in $var

Replies are listed 'Best First'.
Re^2: feeding stdin of executed command and store stdout in $var
by gabrielsousa (Sexton) on Jan 25, 2017 at 13:35 UTC
    i want to list the ftp, and than download some files, not all
    after de "ls" i want to send other command
    but before send other command i want to read what files are in ftp

      Thank you for clarifying what you intend to do.

      Have you tried using Net::FTP instead of lftp? In what way was it unsuitable for your needs?