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