sub write_chunk { (my $count) = $port->write($_[0]); }