Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 1999 17:28:35 +0200
From:      Anton Berezin <tobez@plab.ku.dk>
To:        Ugen Antsilevitch <ugen@xonix.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Perl question...
Message-ID:  <19990916172834.A74539@lion.plab.ku.dk>
In-Reply-To: <37E049FE.20AAFEC0@xonix.com>
References:  <37E049FE.20AAFEC0@xonix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <FH>?

Hope this helps,
-- 
Anton Berezin <tobez@plab.ku.dk>
The Protein Laboratory, University of Copenhagen


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990916172834.A74539>