in reply to Re^2: (Seemingly) Broken interactions between Net::Server and IO::Pipe?
in thread (Seemingly) Broken interactions between Net::Server and IO::Pipe?
I have never used IO::Pipe before, but from the docs it looks like you need to do a
UPDATE
BTW, when running this code on Cygwin, I get the following:
when I run it it cats out the file fine, Id probably replace IO::Pipe with a routine that reads the file one line at a time. At least from what Ive read, that seems to be the desired effect.while(<$pipe>) { read from pipe... }
UPDATE
BTW, when running this code on Cygwin, I get the following:
after copying client.pl to /home/ted/foo/clientted@skywalkerii ~ $ perl client.pl 2006/03/08-02:31:02 CONNECT TCP Peer: "127.0.0.1:1245" Local: "127.0.0 +.1:8097" Use of uninitialized value in concatenation (.) or string at server.pl + line 23. Got: >Line = < #!/usr/bin/perl -w # client use strict; use IO::Socket::INET; my $sock = IO::Socket::INET->new(PeerHost => 'localhost', PeerPort => 8097, Proto => 'tcp', ); die "Unable to connect" unless $sock->connected(); while (my $receive = <$sock>) { print "Got: >$receive<\n"; }
Ted
--
"That which we persist in doing becomes easier, not that the task itself has become easier, but that our ability to perform it has improved."
--Ralph Waldo Emerson
--
"That which we persist in doing becomes easier, not that the task itself has become easier, but that our ability to perform it has improved."
--Ralph Waldo Emerson
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: (Seemingly) Broken interactions between Net::Server and IO::Pipe?
by bmcatt (Friar) on Mar 08, 2006 at 16:04 UTC |
In Section
Seekers of Perl Wisdom