open(T, "/dev/ttyS0") or die "unable to open for writing: $!\n"; open(T, "+