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"; }
In reply to Re: Re: Looking for a hexadecimal byte string in a scalar variable
by ton
in thread Looking for a hexadecimal byte string in a scalar variable
by donfreenut
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |