Hi Guys and Gals ,
I'm new to perl ... Here is my problem ..
I'm connecting fine to the remote computer and logging in fine .. what I
want to do is a get all files from the remote directory . Here is is a
snippet of the code
$ftp->cwd($remote_dir)
or die "cannot change working directory ", $ftp->message;
# show current directory
$ftp->pwd();
@all_files = $ftp->ls();
print @all_files;
foreach $file(@all_files) {
$ftp->get($file)
or die "cannot get file", $ftp->message;
}
The problem is that the remote directory has a subdirectory in it so the
array reads it in @all_files = $ftp->ls; so when I go to do a
$ftp->get($file) it reads the subdirectory name into it as well so it
bombs out saying it cannot find file BLAH BLAH ... is there a way to
read the directory without the subdirectory in there .. just the files I
want to get .
Hope this is clear ..
Thanks
Chris
-----------------------------------------------------------------
Visit our Internet site at http://www.reuters.com
Get closer to the financial markets with Reuters Messaging - for more
information and to register, visit http://www.reuters.com/messaging
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Reuters Ltd.