@Markerrag -- that is good advice for professional installers, but what about amateurs that like to do projects for themselves? They are the ones prone to making measurement mistakes and are also the ones inclined to force a copper pipe in place when it doesn't fit.
If your pipe is too long, there are plenty of inexpensive ways to cut that piece down so it fits properly (just ask your local hardware pro about your options there).
If it is too short, that is when you need to get another piece of pipe. Amateurs are often tempted to use a connector in those cases but that is a bad idea. Connectors tend to develop leaks over time so you want to use them as rarely as you can. Remember -- those make good connectors but bad extenders.