Help for this page

Select Code to Download


  1. or download this
    # In the configuration section...
    my @Toggles = ('on', 'off');
    
    # In some loop in the code...
    $Toggles[$flip = !$flip]
    
  2. or download this
    my @BGColors = ('#dddddd', '#ffffff');
    
    ...
        </tr>
      };
    }
    
  3. or download this
    # To cycle through any number of elements...
    my @Cheers = ('hip', 'hip', 'hoo', 'ray');
    ...
    for (1..12){
      print "$Cheers[$flip = ++$flip % 4]\n";
    }