my $color = "default color"; $color = param('color') if param('color') =~ /^\w+$/;