I'm using the Device::SerialPort to monitor the logs from our Panasonic phone system ;) Take a look at CPAN.
It's as easy as: use Device::SerialPort; $port = new Device::SerialPort("/dev/ttyS0"); $port->baudrate(9600); $port->parity("none"); $port->databits(8); $port->stopbits(1); $port->handshake("rts"); $port->write_settings; while (1) { $data = ""; while (($data = $port->lookfor) eq "") { die "Device::SerialPort Aborted without match\n" unless (defined $data); select undef, undef, undef, 0.25; # Prevent the program to takeover the CPU ;) } } There, in $data you have a line up to the first \n. HTH.- ----- Original Message ----- From: Jeff Liu To: Beginners Sent: Thursday, February 28, 2002 19:00 Subject: perl serial port program Hi there, I need to cook a perl script talking to /dev/ttyS0, it will be used to monitor a RAID device via serial port. But even spending the whole day I was still not lucky enough to be successful. Could you please show me a way to deal with it? Many thanks, Jeff Liu -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]