Mit /dev/ttyI0 quatschen
Florian Lohoff
flo at rfc822.org
Mon Jul 26 17:06:49 CEST 1999
On Mon, Jul 26, 1999 at 05:45:53PM +0200, Marco Anstett wrote:
> Hallo,
>
> ich habe mit /dev/ttyS0 unter Perl das gleiche Problem, daß die bereits
> eingelesenen Daten noch irgendwo stecken und immer wieder ausgegeben werden.
>
> Ich hab das Gefühl, daß die Daten in einem 'Inputbuffer' liegen. Allerdings
> hab ich keine Ahnung wo ich den einstellen soll und ob ich da überhaupt
> irgendwas einstellen kann.
>
> Für Infos in dieser Sache wäre ich auch sehr dankbar.
sysread vs. read ...
man perlfunc::sysread
---------------------schnipp--------------------
Attempts to read LENGTH bytes of data into
variable SCALAR from the specified FILEHANDLE,
using the system call read(2). It bypasses stdio,
so mixing this with other kinds of reads, print(),
write(), seek(), or tell() can cause confusion
because stdio usually buffers data. Returns the
number of bytes actually read, or undef if there
was an error. SCALAR will be grown or shrunk so
that the last byte actually read is the last byte
of the scalar after the read.
---------------------schnapp--------------------
Flo
--
Florian Lohoff flo at rfc822.org +49-5241-470566
Good, Fast, Cheap: Pick any two (you can't have all three). (RFC 1925)
More information about the Linux
mailing list