in reply to Re: Looking for a hexadecimal byte string in a scalar variable
in thread Looking for a hexadecimal byte string in a scalar variable
Otherwise, you'll get a match if that byte sequence is anywhere in the chunk, not just in the beginning.if ($chunk =~ /^\xff\xff\x08\x00/) { print "Chunk in use\n"; } else { print "Chunk not used\n"; }
|
|---|