in reply to does not exist in an array

You should consider using a hash for storage instead of an array, if the hash is primarily for lookups. Or convert your array into a hash for the lookup:
my @array = qw/ bcd efg hij klm /; my %hash = map { $_, 1 } @array; my $query = 'abc'; if (exists $hash{ $query }) { print "'$query' is in the hash...\n"; }