Is there a better way to communicate via serial?

The serial input basics tutorial proved very helpful to me and shows how to incorporate the start and end markers suggested by @J-M-L.