For the more ecconomical approach: You can also get two hose clamps, loop the first clamp through the flashlight, loop the second through the loop of the first at a right angle to the connected clamp, loop the second clamp through the handlebar.
Usually can get the hose clamps under a $1 each at an auto parts store or 6-10 packs for a dollar at a dollar store.
Hose clamps are useful. You can also attach a water bottle cage with them if you don't have the holes drilled.