Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Transfer files (network)

by FireBird34 (Pilgrim)
on Feb 17, 2004 at 05:36 UTC ( #329517=perlquestion: print w/ replies, xml ) Need Help??
FireBird34 has asked for the wisdom of the Perl Monks concerning the following question:

I have a small home network setup, and am trying to use Perl to help learn more about *both*. I currently am creating some tools to help me with this -- one of which allows me to transfer files via the network. I know I'm doing some of this the hard way, but that doesn't bother me heh. Anyway though, would there be any module out there that would help me with this (transfering files via network)? I've looked into Net::FTP, however I don't have an FTP server setup, nor do I want one. I've looked into doing this such as programs like GoToMyPC, however I have NO idea how they transfer files via network (can't seem to find out either). Any help?

Comment on Transfer files (network)
Re: Transfer files (network)
by kvale (Monsignor) on Feb 17, 2004 at 06:01 UTC
    It seems to me that if you want to send a file from computer A to computer B, then B has to have some way of listening for a connection and receiving the file. This is what a server does, so you will need to implement some sort of server to do this.

    FTP is the most common sort of file transfer protocol, so I would recommend using it. If you want to make setting up an FTP server more fun, try Net::FTPServer.

    -Mark

      LoL! What doesn't CPAN have? I'll look into this! Thanks! (I have a simple listening 'server' on each computer for information, but nothing more than a simple socket using IO::Socket::INET heh)

      There is no Net::FTPServer module for Windows. So if FireBird34 is running on a MS platform s/he will not be able to use it easily.

      Have a look at creating a listening socket on the server and a client piece that connects to that socket.

      Below is some code I found (here at PerlMonks I think) that sets up a socket and transfers a file from the client.

Re: Transfer files (network)
by zentara (Archbishop) on Feb 17, 2004 at 15:53 UTC
    You should go to the Code Catacombs on perlmonks, and check out the Networking code section. I have one using Net::EasyTCP, which has passwords etc. But a nice simple one is by Anarion called netcat-w-blowfish

    There is also alot of code in the Snippets section. The C version of netcat is usually used as a standard app for doing this. Search for netcat on google.


    I'm not really a human, but I play one on earth. flash japh

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://329517]
Approved by Roger
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2014-11-20 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (103 votes), past polls