http://www.perlmonks.org?node_id=295796


in reply to Storable: Byte order is not compatible

Quoth Storable:
What this means is that if you have data written by Storable 1.x running on perl 5.6.0 or 5.6.1 configured with 64 bit integers on Unix or Linux then by default this Storable will refuse to read it, giving the error Byte order is not compatible. If you have such data then you you should set $Storable::interwork_56_64bit to a true value to make this Storable read and write files with the old header. You should also migrate your data, or any older perl you are communicating with, to this current version of Storable.
See if setting that flag helps.

Replies are listed 'Best First'.
Re: Re: Storable: Byte order is not compatible
by moseley (Acolyte) on Oct 02, 2003 at 04:37 UTC
    I saw $Storable::interwork_56_64bit in the docs, but didn't think it would apply since I have 4 byte integers on both platforms. Not to mention it didn't solve the problem.

    I'm able to read the entire Berkeley DB table into a hash and write it with nstore (nice to have lots of RAM). Then I can read that on the other machine.

    BTW - I can't just tie %hash to the Berkeley DB and nstore( \%hash, 'file' ), though. That might haved saved some memory.

    So perhaps it is either an issue with nfreeze on the old machine or somehow converting the berkeley db table to a newer version trashed the data (which seem less likely).