in reply to binary to piddle

I found another tut: Pack/Unpack Tutorial (aka How the System Stores Data). I'm not sure if I understood your format correctly, but it appears as though, version = first 2 bytes, extension = bytes 7-10.

So, to get those values (untested):

$ver = unpack("n", substr($buf,0,2)); #or s signed 16 bit $extension = unpack("l", substr($buf,6,4)); # signed 32 bit int
Does that work with your test data?
The string $buf is special in that it is binary (full range of 0-255) for each "character" instead of just character values. substr works on it although I think there is another way of specifying the index to start at.

I've never tried to convert an IEEE network order float. There may be some issues here, but since you have an independent way of verifying the correctness of the conversion, I would just try converting a few and see if there is a problem or not.

I guess the question is whether our not you can "get to first base" now?