Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?


by AcidHawk (Vicar)
on Aug 17, 2004 at 19:12 UTC ( #383773=note: print w/replies, xml ) Need Help??

in reply to Help using FTP for CGI

FTP ... stands for File Transfer Protocol. You have a server which has directories that you can read files from or copy file to (Depending on you access).

By typing FTP at the shell (command line) you are starting a client that can "get" or "put" files on the server.

If you are looking at doing this Client stuff from within a script hardburn is correct look at Net::FTP. (Example from the docs below)

#You have to tell your script to use the module. use Net::FTP; #Establish a connection to the ftp server (in this case $ftp = Net::FTP->new("", Debug => 0) or die "Cannot connect to $@"; #provide the login information to the ftp server $ftp->login("anonymous",'-anonymous@') or die "Cannot login ", $ftp->message; #Change dir to /pub $ftp->cwd("/pub") or die "Cannot change working directory ", $ftp->message; #copy the file from the ftp server to your local dir. $ftp->get("that.file") or die "get failed ", $ftp->message; #End your connection to the ftp server $ftp->quit;

If you are looking to write a "kind of" server you need to look at Net::FTPServer although I have had no experience with this.

Of all the things I've lost in my life, its my mind I miss the most.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://383773]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2016-10-24 21:28 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (310 votes). Check out past polls.