typedef struct Net_LogMsgHdr { int32 magic; Net_LogMsgType type; int32 nextLogChar; int32 logBufferSize; int32 length; int32 override; uint64 bootTS; uint64 pad; } Net_LogMsgHdr; #### my $sock = IO::Socket::INET->new( LocalAddr => '127.0.0.1:6300', LocalPort => 6300, Proto => 'udp', ); my $incoming; while ($sock->recv($incoming, 65536)) { my ($magic, $type, $nextLogChar, $logBufferSize, $length, $override, $bootTS, $pad) = unpack "llllllQQ" , $incoming; #### "Results on large (or negative) numbers may vary depending on the number of bits your machine uses to represent integers".