open( my $LFTP,'|-', "lftp -u $user,$pass -e open $host " ) || die "Ca +nnot open lftp: $!"; print $LFTP <<"END"; ls END [download]
In reply to feeding stdin of executed command and store stdout in $var by gabrielsousa