Re: simple sockets

2001-10-20 Thread RaFaL Pocztarski
Florentin Ionescu wrote: > Can you please elaborate why"defined(<$new_sock>)" > does not assign data to $_ ? > My understanding was that although redundant > behavior in both cases should be identical. while() is a shortcut for while(defined($_=)) but defined() is not a shortcut for

Re: simple sockets

2001-10-20 Thread Florentin Ionescu
ECTED]> To: "zentara" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, October 19, 2001 10:34 AM Subject: Re: simple sockets > On Fri, Oct 19, 2001 at 12:54:07PM -0400, zentara wrote: > > ###RECEIVE: > > #!/us

Re: simple sockets

2001-10-19 Thread Michael Fowler
On Fri, Oct 19, 2001 at 12:54:07PM -0400, zentara wrote: > ###RECEIVE: > #!/usr/bin/perl -w > use IO::Socket; > my $sock = new IO::Socket::INET ( > LocalHost => 'localhost', > LocalPort => '7070', > Proto => 'tcp', > Listen => 1, > Reuse => 1,

simple sockets

2001-10-19 Thread zentara
Hi, I found this simple example of sockets in a tutorial and I want to make it work. It seems to work, but I get no output at the receive end. The problem seems to revolve around the receiver's "print $_" statement. I run RECEIVE first, and it starts with no errors and waits. Then I run SEND and i