# In the configuration section... my @Toggles = ('on', 'off'); # In some loop in the code... $Toggles[$flip = !$flip]