use strict; use warnings; my @known = ("foo", "bar", "baz"); print "Talk to me, Goose."; my $input = ; chomp($input); my ($in_fla) = grep/^$input$/i, @known; if ($in_fla) { print "You gave us $input, which equates to ".uc($in_fla).". Good night, and good luck.\n"; } else { print "Not a match. YET!\n"; } __END__ D:\Workout>perl array.pl Talk to me, Goose.Foo You gave us Foo, which equates to FOO. Good night, and good luck. D:\Workout>perl array.pl Talk to me, Goose.FOO You gave us FOO, which equates to FOO. Good night, and good luck. D:\Workout>perl array.pl Talk to me, Goose.arr Not a match. YET!