Help for this page

Select Code to Download


  1. or download this
    for (qw/green blue red/) {
        if ($color eq $_) { ... }
    ...
    
    for each of green, blue and red:
        if the color is it, do something
    
  2. or download this
    for (qw/green blue red/) {
        if ($_ eq $color) { ... }
    ...
    
    for each of green, blue and red:
        if it is the color, do something