#!/usr/bin/perl -w %color = qw(red apple green leaves blue ocean); print "Please enter a color : "; chomp($color = <>); $answer = $color{$color} || "nothing"; print "When I think the color $color, I think $answer.\n";