use constant DOT => qr[\.];; print grep $_ =~ DOT, qw[ a b c . d e f];; .