in reply to RegEx Confusion!
The definition of convert_byte_count() is left as an exercise for the reader.my $flag1 = substr $packet, 0, 8; my $byte_count = substr $packet, 9, 16; my $num_bytes = convert_byte_count($byte_count); my $payload = substr $packet, 25, $num_bytes * 8; my $flag2 = substr $packet, 25 + $num_bytes * 8, 8;
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|