Preheat your oven to 350°F (175°C). Grease the 9x9-inch baking pan or line it with parchment paper for easy removal.
In a mixing bowl, combine the flour and granulated sugar. Add the softened butter and mix until the mixture resembles coarse crumbs. Press evenly into the bottom of the prepared baking pan to form the crust.
Bake the crust in the preheated oven for about 15 minutes, or until lightly golden. Remove from the oven and let cool slightly.
In another mixing bowl, whisk together the brown sugar, corn syrup, melted butter, eggs, vanilla extract, and salt until smooth. Stir in the chopped pecans or raisins if using.
Pour the filling mixture over the baked crust, spreading it evenly.
Return the baking pan to the oven and bake for an additional 15-20 minutes, until the filling is set and slightly bubbly.
Remove from the oven and let cool completely in the pan before cutting into squares.
For best results, refrigerate the squares for a couple of hours before cutting; this helps the filling to firm up.
Store leftovers in an airtight container at room temperature for up to 4 days.