my @items = (1, 2, 3, 'four', 5, 'six');
my $found_match = 0;
foreach my $item (@items) {
    if ($item eq 5) {
        print "Found $item\n";
        $found_match = 1;
        last;
    }
}
if (!$found_match) {
    print "Didn't find what I was looking for\n";
}