Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!agate!ucbvax!tut.cis.ohio-state.edu!sei.cmu.edu!fs7.ece.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!ea08+ From: ea08+@andrew.cmu.edu (Eric A. Anderson) Newsgroups: comp.lang.perl Subject: Multiple simultaneous accepts with an array. Message-ID: Date: 24 Apr 91 23:08:52 GMT Organization: Carnegie Mellon, Pittsburgh, PA Lines: 21 I am writing a program which I want to have listen on a port, and when it gets connections, keep adding all the connections to a list. So I wrote the following line : ($addr = accept($DataSock[++$#DataSock],CONNSOCK)) || die $!; Now what happens when this runs is that the first connection is opened fine, but when a second connection comes in, the first one is killed. I have also noticed that this doesn't work : print fileno($one) . "\n"; $test = $one; print fileno($test) . "@@\n"; Where one has acceptedon the port. The fileno is printed for one, but nothing is printed for test. Is there any easy way to deal with this? -Eric ********************************************************* "My life is full of additional complications spinning around until it makes my head snap off." -Unc. Known. "You are very smart, shut up." -In "The Princess Bride" *********************************************************