I'll be brief so I don't waste your time;
Simple problem, i have an array of say, hundreds of dogs
my @dogs = qw(Shepard Lab Dalmation Husky Chow Pitbull ...)
and i want to compare it to a single dog
my $doggy = "Shepard";
pretty stupid i know, but how would i do that?
# Regex match against array?
# (This doesnt even work but its how i would think of doing it)
if ($doggy =~ /@dogs/) {
print $doggy;
}
Thanks for any answers in advance, I appreciate you guys helping me with what is probably a really stupid question. Thank you