in reply to pack() Question - DATA_BLOB structure

You've got it backwards. You need a byte in a pointer (pointer to a byte) not a pointer in a byte (which probably won't work on machines from the last couple of decades).

A string is already a sequence of bytes (ignoring stuff like unicode, etc), so theres no need to pack it as such.

Untested correction code:

my $blob = pack('LP', length($data), $data);

There are a lot of issues dealing with packing/unpacking C structs. For details on these and ways around them, please see: