There are few animal pests as clever as the raccoon. With their dextrose hands and feet, they can get into garbage cans, sealed compost bins and gardens with relative ease.
I avoided growing sweet corn for years because of raccoons. Then I thought I'd try popcorn. I figured popcorn doesn't have sweet kernels so the raccoons would leave it alone. That worked for a few years, then they found my patch. As usual, the night before I was ready to harvest they struck, munching only bits out of multiple ears and pulling down the stalks. I've seen similar raids on melons, beans and tree fruits!
So, what to do about raccoons. First of all, don't leave any standing water in your yard such as birdbaths and kiddie swimming pools. Raccoons love to clean their food before eating it.
Most fencing is not going to stop a nimble raccoon. They can scale even a tall wire fence. They can even use their hands to open up chicken wire fences cobbled together around a garden. The best fencing is wire cages with tops that completely cover the planting. Stake the cage down well. Of course, that won't work for my 6 foot tall corn stalks.
So, this year I bought a portable, solar, electric fence kit. By setting it up early around the corn patch, I hope to train the raccoons to stay out. It has a solar panel that charges the wires during the day and a battery to keep it charged at night. I just have to keep weeds and grass from touching the fence. Wish me luck!