Hi,

Try using libnet, this is a library that allows you to use ftp, telnet etc
from Perl. Avzilable from CPAN or using PPM.

Regards,

Nigel R

Gary Stainburn wrote:

> Hi Daniel,
>
> assuming you're not worried about the ftp failing, you could do
> something line:
>
> open(FTP,"|ftp -ivn")|| die can't fork ftp: $!\n;
> print FTP "open ftp.me.com\n";
> print FTP "user me mypassword\n";
> print FTP "put myfile\n";
> print FTP "get theirfile\n";
> print FTP "bye\n";
> close(FTP);
>
> Hope it helps,
>
> I also think there are some FTP perl modules, which would let you do it
> directly.  Have a look on CPAN.
>
> Gary
> On Wednesday 02 May 2001  6:19 am, Daniel Choong wrote:
> > okie, this probably sounds very simple but i dunno how
> > to do it. i just learnt perl. i need some tips on how
> > to use a perl script to automate the updating of files
> > on multiple servers. i am trying to use ftp but i do
> > not know how to write the script to read the output
> > from ftp, then send the username and passwd, then
> > detect the prompt and send the commands. i suppose
> > there's a simple way to do that but i am lost.
> > anyone knows how to do that? i tried using IPC::Open2
> > but i dunno how to use it properly.
> > daniel
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - buy the things you want at great prices
> > http://auctions.yahoo.com/
>
> --
> Gary Stainburn
>
> This email does not contain private or confidential material as it
> may be snooped on by interested government parties for unknown
> and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
>

Reply via email to