We have had raccoons in our corn for years....here are a few ways to keep them out.
1. We keep a radio on in our garden at night...Place it in a plastic bag if calling for rain.
2. You can interplant corn with pumpkins and squash....raccoons don't like stepping on the prickly vines and leaves.
3. Our favorite way is to place a floppy chicken wire about two feet wide over the top of your garden fence. It won't support the weight of the raccoon and they should flip right off.
I hope this saves your garden from the raccoons.