Soak the wooden skewers in cold water for at least 30 minutes before broiling or grilling the pineapple.
Gently heat the sugar and water together in a saucepan, until the sugar dissolves. Halve the vanilla bean, scrape the seeds from the pod, and add them to the pan. Add the rest of the bean pod, and the lime zest, as well. Simmer the ingredients gently for 10 to 12 minutes, or until the liquid is reduced and syrupy. Add the rum to the mixture, if using.
Preheat the broiler on high or preheat a grill to medium-high, and lightly oil the grate.
Meanwhile, remove the top and tail of the pineapple. Carve away the skin and scoop out the spiny eyes. Cut the pineapple crosswise into eighths, and discard the inner core from each piece. Slide the pineapple slices onto the presoaked wooden skewers.
Broil the skewered pineapple pieces for 8 to 10 minutes on a baking pan lined with aluminum foil or grill the skewers 8 to 10 minutes. Spoon the hot spiced syrup over the skewers, and serve with ice cream, if desired.