if ( $fruit eq 'lemon' ) { $color = 'yellow'; } elsif ( $fruit eq 'orange' ) { $color = 'orange'; } elsif ( $fruit eq 'tomato' ) { $color = 'red'; }