[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] NET::FTP full newbie problem



lemarchand@calva.net writes;
}Hi !
}
}I want to use a ftp command as this in macperl program :
}
}...
}use Net::FTP;
}...
}$ftp = NET::FTP->new("wwwperso.hol.fr" );

$ftp = Net::FTP->new("wwwperso.hol.fr");

}$ftp->login ("login", "password");
}$ftp->cwd("www");
}$ftp->put("$theFilename");
}$ftp->quit;
}
}But this ftp code does not work.

Where exactly does it fail, and what does it say?  Where you've misspelled
Net?  Or do you spell it right in the code you're trying?  One other thing
you might try is to turn on debugging:

$ftp = Net::FTP->new("wwwperso.hol.fr", Debug => 1);

Then you find out exactly what's going wrong...if it's getting that far.


}
}I use a 5.1.3r2 MacPerl Version.
}I have downloaded from ftp://mors.gsfc.nasa.gov/pub/MacPerl/Scripts/ the
}libnet directory and I have put this folder in the macperl:lib folder. (
}I have renamed the libnet folder as Net ).

Bad idea, but never mind.  In you MacPerl lib folder, you should have a
folder named Net, and in that a file (among others) named FTP.pm.  (One
reason that it's a bad idea to put things in your MacPerl lib folder is
that it comes with  a folder named Net, so you have to add to it without
destroying it.)  Do you have :lib:Net:FTP.pm, or have you put the folder in
the wrong place?  Renaming the libnet folder isn't what you want to do.
Extracting the contents of the libnet folder and putting it in your MacPerl
search path is what you want to do.  The easy way to do this is to take the
libnet folder, put it somewhere, and use Preferences... in MacPerl itself
to add the libnet folder to your MacPerl libraries.

Here's a simple test you can try to see if you've installed it properly:

#!perl

use Net::FTP;

print $INC{Net/FTP.pm}."\n";

This should print the full path to FTP.pm.  If it doesn't, MacPerl isn't
finding FTP.pm.

}
}I would like someone to explain me why it does not work, what I have to
}check, what I have to change...
}
}Many thanks in advance for a full macperl french newbie.
}
}bye
}--
}_________________________________________________
}Frederic Lemarchand & Nathalie Pascal
}on Apple Macintosh, NT, Win95
}lemarchand@calva.net
}F78280 Guyancourt, France
}_________________________________________________
}
}***** Want to unsubscribe from this list?
}***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch


---
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@pjstoaster.pg.md.us



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch