my $precipitation; if ($rain == 0) { $precipitation = 'dry'; } elsif ($rain == 1) { $precipitation = 'wet'; }