Lars,
I believe 'unpack' is the right way to go, you just need to get the template
right ('N' in your example)
See the explanation on http://www.perlmonks.org/?node_id=224666, especially the
section on 'unpack'
"unpack takes a template string and a scalar and returns a list of values."
($
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_soc