Flash the Alligator

A New York boy was being led through the swamps of Louisiana by his cousin. “Is it true that an alligator won’t attack you if you carry a flashlight?
“The cousin smirked and replied, “Depends on how fast you carry the flashlight.”