rupesh has asked for the wisdom of the Perl Monks concerning the following question:
What I would like to do now is:Server: #!c:\perl\bin\perl.exe use strict; use IO::Socket; my $server = IO::Socket::INET->new( Listen => 5, LocalAddr => 'localhost', LocalPort => 5498, Proto => 'tcp' ) or die "Can't create server socket: $!"; my $client = $server->accept; open FILE, ">out.txt" or die "Can't open: $!"; while (<$client>) { print $_; } close FILE; Client: #!c:\perl\bin\perl.exe use strict; use IO::Socket; my $server = IO::Socket::INET->new( PeerAddr => 'localhost', PeerPort => 5498, Proto => 'tcp' ) or die "Can't create client socket: $!"; open FILE, "labsearch.txt"; while (<FILE>) { print $server $_; } close FILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Send file(s) via socket
by Roger (Parson) on Jan 22, 2004 at 05:28 UTC | |
|
Re: Send file(s) via socket
by Fletch (Bishop) on Jan 22, 2004 at 13:51 UTC | |
|
Re: Send file(s) via socket
by pg (Canon) on Jan 22, 2004 at 06:50 UTC | |
by rupesh (Hermit) on Jan 22, 2004 at 07:59 UTC | |
|
Re: Send file(s) via socket
by rupesh (Hermit) on Jan 23, 2004 at 06:39 UTC |