Advertisement

02.24.2004 at 12:21PM PST, ID: 20896557
[x]
Attachment Details

mget using Net::FTP

Asked by oscarfg in Perl Programming Language

Tags: mget, perl, ftp

Trying to implement mget since it is not a built in function in the NET::FTP library but I keep running into problems.  This is what I have:

my($ftp,$pattern) = @_;
foreach my $file ($ftp->ls($pattern)) {
print "File Name: $file \n";
#$ftp->get($file) or warn $ftp->message;
}

The error I get is "Can't call method "ls" on an undefined value" and it refers to the $pattern in the second line.  I'm running perl on a W2K box and I'm trying to FTP to another W2K box. Start Free Trial
[+][-]02.24.2004 at 12:30PM PST, ID: 10444376

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.24.2004 at 12:33PM PST, ID: 10444408

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.24.2004 at 01:01PM PST, ID: 10444746

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: mget, perl, ftp
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02.24.2004 at 01:49PM PST, ID: 10445173

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.24.2004 at 02:02PM PST, ID: 10445329

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.24.2004 at 02:09PM PST, ID: 10445381

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32