From owner-freebsd-questions Thu Sep 16 8:32:10 1999 Delivered-To: freebsd-questions@freebsd.org Received: from plab.ku.dk (plab.ku.dk [130.225.105.65]) by hub.freebsd.org (Postfix) with ESMTP id 8148D156EA for ; Thu, 16 Sep 1999 08:32:03 -0700 (PDT) (envelope-from tobez@plab.ku.dk) Received: from lion.plab.ku.dk (lion.plab.ku.dk [130.225.105.49]) by plab.ku.dk (8.9.1/8.9.1) with ESMTP id RAA20459; Thu, 16 Sep 1999 17:32:02 +0200 (CEST) Received: (from tobez@localhost) by lion.plab.ku.dk (8.9.3/8.9.3) id RAA74564; Thu, 16 Sep 1999 17:28:35 +0200 (CEST) (envelope-from tobez) Date: Thu, 16 Sep 1999 17:28:35 +0200 From: Anton Berezin To: Ugen Antsilevitch Cc: questions@FreeBSD.ORG Subject: Re: Perl question... Message-ID: <19990916172834.A74539@lion.plab.ku.dk> References: <37E049FE.20AAFEC0@xonix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre1i In-Reply-To: <37E049FE.20AAFEC0@xonix.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Sep 15, 1999 at 09:38:06PM -0400, Ugen Antsilevitch wrote: > I am thinking here on a small perl problem and i can't find any > better forum then this one. If the use of *mailing list* is not a requirement, may I suggest *newsgroups* comp.lang.perl.misc and/or comp.lang.perl.moderated? > Anyway, how do i cleanly implement simultaneous input from number of > files using select (or anything else) and yet not using sysopen? I > have to use regular open since those files are all (or part) other > processes outputs | to perl script. Now, i guess if i just open it > and use select - it will indicate when data available, so i will read > one line? But this is buffered input so more data can be read, so > much in fact that nothing will be left in the actual file descriptor. > Next select will block and then show no data available. On the other > hand i can't continue reading lines since i might block on that? You can't use sysopen(), but what on Earth keeps you from using *sysread()* instead of ? Hope this helps, -- Anton Berezin The Protein Laboratory, University of Copenhagen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message