my $data = "\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11"; my @find = ( # These Work qr"\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11"s, qr"\x04\x05.{4}\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11"s, qr"\x04\x05\x06\x07\x08.{1}\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11"s, qr"\x04\x05\x06\x07\x08\x09\x0a.{1}\x0c\x0d\x0e\x0f\x10\x11"s, #These didn't work before, but do now. qr"\x04\x05.{5}\x0b\x0c\x0d\x0e\x0f\x10\x11"s, qr"\x04\x05\x06\x07\x08\x09.{1}\x0b\x0c\x0d\x0e\x0f\x10\x11"s, ); foreach (@find) { if ($data =~ /$_/) { print "found\n" } else { print "not found\n" } ; };