What are the best practices for working with binary data? If I read a span of binary data, say, into $packet like with read() below
my ( $packet_size, $packet ); read( $client_socket, $packet_size, 4 ); $packet_size = unpack( "N", $packet_size ); read( $client_socket, $packet, $packet_size ); then how should I best access arbitrary ranges of bytes within that block of binary data held by the $packet variable? For example, put the first byte from $packet into one variable, the second byte into another, the third through 18th into yet another, and so on? Regards, Lars -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/