# reverse endianness of first 4-byte float: substr( $buf, 0, 4 ) = reverse substr( $buf, 0, 4 );