in reply to Re: How to print specific word from array/hash?
in thread How to print specific word from array/hash?
And of course, this approach allows a number to represent more than one color, if this is necessary:
c:\@Work\Perl\monks>perl -wMstrict -le "my $color = 7; ;; my %colors = qw(blue 1 green 7 red 3 pink 7 purple 6); ;; my @picked = grep { $colors{$_} eq $color } keys %colors; print qq{color(s) picked by $color: @picked}; " color(s) picked by 7: green pink
Give a man a fish: <%-{-{-{-<
|
|---|