Preheat oven to 325°F. Line baking sheet with aluminum foil and spray with nonstick spray (or use a silpat sheet and do not use the nonstick spray).
In a medium size bowl, combine the sugar, salt, black pepper and cayenne pepper. Add the corn syrup, stirring to combine. Add the walnuts, tossing to coat. Spread the walnuts on the prepared baking sheet and drizzle any remaining corn syrup mixture from the bowl over the walnuts. Bake for 15 minutes until the walnuts are golden and the sugar mixture is bubbling, flipping the walnuts over midway. Cool completely on a baking sheet. Can be made 3 days ahead. Store in airtight container. Experiment with spices. You could also use 1/4 teaspoon salt, 1/8 teaspoon cinnamon and/or ginger, a smaller pinch of cayenne and just 1/8 teaspoon black pepper. Make more than you think you’ll need since you, and any kitchen stalkers, will taste more than you intend. If you don’t have any walnuts, you could use pecans.