When I switched to an SLR, I found I was always losing my lens cap, which wasn't a problem on my previous camera as it was attached to the body on a string. I didn't want to drill a hole or permanently modify my lens cap, so I thought Sugru would make a good semi-permanent attachment point that wouldn't damage the cap.
Step 1: Add Sugru
I used black, for that professional look. You only need a small pinch for this, so you might want to save this for when you are already using some Sugru for another task. Alternatively, do something creative with the leftovers!
Clean the lens cap to make sure there's no dust or grease on it. If your cap has a smooth surface you might want to roughen it up slightly with a file, knife or sandpaper to make sure there's a "key" for the Sugru to stick to. Mine had a matt textured finish so I didn't need to do this.
Stick a smallish blob of Sugru onto the front of the cap, about half an inch wide by a quarter of an inch high.
Step 2: Make It Hole
Use a pointed object to poke a small hole into the Sugru blob. Make sure it's at least 1/8" wide so your string can fit through later. It's a bit tricky to do this while keeping the Sugru stuck to the lens cap, you might have to squish it about a bit to get everything well formed.
Step 3: String It Up
Once the Sugru has cured (leave it overnight for best results), find a piece of string at least long enough to go from the lens cap to the camera strap and back, plus a couple of inches to allow for the knot. I made mine about 24" long so it would fit longer zoom lenses. Feed the string through the hole in the Sugru, then through your camera's strap attachment, and join the ends with your favourite string-end-joining knot.
Now go out and use your camera, safe in the knowledge that you can pop off the lens cap and not worry about where you put it.