$port = new Device::SerialPort ( "/dev/ttyS0");
$port->baudrate(9600);
$port->databits(7);
$port->stopbits(1);
$port->parity("odd");
then run: root@linux5 root# perl -c tt.pl
tt.pl syntax OK root@linux5 root# perl -W tt.pl
(in cleanup) Can't call method "setcflag" on an undefined value at /usr/lib/perl5/site_perl/5.8.0/Device/SerialPort.pm line 541 during global destruction.