Don't be afraid to cut a piano hinge thinking it'll fall apart in your hands and be ruined. That won't happen. There is a pin running through the full length of a piano hinge making it, a continuous hinge. This pin is engineered to stay put even when the hinge is cut. It's impossible for manufacturers to produce piano hinges to the exact length each individual project requires. Instead they produce standard lengths that can be easily cut down to any size needed.
Purchase a piano hinge that is longer than what you need. Measure the length it's to be cut to and make a mark on the hinge. Make sure not to mar the finish on the part of the hinge to be used for the project.
Cut two strips of corrugated cardboard 1-inch wide and the length of the hinge and place one on either side of the closed hinge with the hinge pin facing up.
Open the vise mounted on the work top and position the hinge so it is sandwiched between the two strips of cardboard in the mouth of vice. Slowly turn the handle until the jaws start tightening against the cardboard and hinge. Go slow once contact is made. Check to make sure the hinge is positioned correctly in the vise so that the pin remains just above the jaws of the vise.
Make sure the measurement mark on the vise is sticking out beyond the vise about a 1/2 inch. Pick up the hacksaw, line up the teeth of the blade on the top of the hinge where the hinge pin is running through and slowly saw all the way through the hinge.
Hold on to the hinge while opening the vise. Lay the hinge over on the project it's to be used for. Check the length for accuracy. If more needs to be taken off the hinge, simply clamp it back into the vise and re-saw.
When the hinge is the precise length required, take a small piece of fine emory sandpaper and lightly sand the end that the excess has been cut from to remove any metal burrs made by the hacksaw.
To prevent burrs when cutting the hinge with a hacksaw, place masking tape over the hinge before cutting it with a hacksaw.