if I send a command to a ftp process, and I want to store it's (sic) return value
Are you just doing FTP? Do you need to use Expect, or is there some reason why you can't/don't want to use Net::FTP? The code will be much simpler:
my $ftp = Net::FTP->new('foo.example.com') or die "can't connect: $@"; $ftp->login( 'leet', 'seKreT' ) or die 'can't login: ' . $ftp->message; $ftp->cwd("/pub/foo/bar") or die 'cannot set cwd' . $ftp->message; my @files = $ftp->dir(); $ftp->quit;
In reply to Re: How to store the output of the process in my own array?
by grinder
in thread How to store the output of the process in my own array?
by seanborland
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |