- or download this
my $rv = sysread(FIFO, $fifodata, 64*1024, length($fifodata));
- or download this
my $rv = sysread(FIFO, $fifodata, 64*1024, length($fifodata));
...
...extract message from $fifodata...
...process message...
}
- or download this
while (length($fifodata) > $MSG_SIZE) {
my $msg = substr($fifodata, 0, $MSG_SIZE, '');
process_msg($msg);
}
- or download this
while ($fifodata =~ s/^([^\n]*\n)//) {
my $msg = $1;
process_msg($msg);
}