Using a combination square or a speed square draw a line across a scrap piece of wood. This line is perpendicular to the edge. Using your handsaw try to cut just to the right or left of the line. By leaving the line instead of cutting right on it you will be able to have something to follow while you’re cutting. If you’re still having some difficulty keeping the blade cutting in a straight line try this trick.
Place a board that has a straight edge across this line and clamp it down. Use this as a reference for keeping the saw going in a straight line. It also helps keep the saw blade perpendicular to the work surface. When you’re done, place the square back on the work surface to see how close you came to staying on the line. Keep practicing until you can cut a straight line that’s perpendicular to the edge of the work piece.