http://qs321.pair.com?node_id=977166


in reply to Re^3: Storable: Byte order is not compatible
in thread Storable: Byte order is not compatible

I forgot, if the byte order differs, len() also needs to update the length in the other order. E.g.:

sub len { my $len = unpack 'V', substr( $data, $pos, 4 ); substr( $data, $pos, 4 ) = pack 'N', $len; $pos += 4; return $len; }