for(;;){ (my $count, my $result) = $PortObj->read(500); print "$result\n"; } #### $echo "foo" >> /dev/ttyS0 $echo "bar" >> /dev/ttyS0