It depends on the material and type of bar to an extent.
Assuming that it is aluminum tubing, a good way is to use a high precision band saw and a pipe jig that will maintain the bar perpendicular to the saw blade. Of course MOST folks don't have this option...
You might get away with a pipe cutter, but I doubt it...
Don't use a hacksaw unless you are either 1)really, really good at freehand sawing, or 2)don't mind a crappy cut (or a lot of cleanup) to the bar ends after the cut.
Now, your best bet is to find a bike shop that has a tubing jig for the bar diameter you have. They can clamp the bar into the jig and use a good hack saw with a new blade and get a pretty fine cut (+/- 0.5mm if they're good) with only a minor amount of cleanup needed (debur inner rim and chamfer the outer rim).
Hope this helps,