in reply to Converting bytes to floats

I believe you're asking for

say for unpack "d*", $contents;

unpack

Mini-Tutorial: Formats for Packing and Unpacking Numbers

Replies are listed 'Best First'.
Re^2: Converting bytes to floats
by Anonymous Monk on Apr 17, 2023 at 19:28 UTC
    It's a series of bytes. This powershell works:
    $len = $bytes.Count/8 for( $i = 0 ; $i -lt $len ; $i++) { [System.BitConverter]::ToDouble($bytes, $i * 8 ) }
        Did you try what I provided?

        I think it's theoretically possible that the OP did follow the advice but struck an endianness issue which, to be resolved, would presumably require either:
        unpack "d<*", $contents or unpack "d>*", $contents
        Cheers,
        Rob
      Yes, I think, what you are looking for is $number = unpack('d', $bytes);

      If $bytes hold 8 bytes, then unpack will convert that to a number.