in reply to How to store the output of the process in my own array?

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;

Replies are listed 'Best First'.
Re: Re: How to store the output of the process in my own array?
by seanborland (Initiate) on Mar 01, 2004 at 09:14 UTC
    I just take ftp for example. However, thank you very much to tell me how to use Net::FTP :)