Storable - Win32 to Linux

J

Jack D

If I save a hash to disc on Win32 using Storable, and then copy the
resulting file to a Linux system - will the file be readable using the
retrieve funtion on the Linux system? If yes - will the version of Perl
matter?

Jack
 
A

A. Sinan Unur

If I save a hash to disc on Win32 using Storable, and then copy the
resulting file to a Linux system - will the file be readable using the
retrieve funtion on the Linux system? If yes - will the version of Perl
matter?

What did you find out when you consulted the documentation?

Sinan
 
J

Jack D

A. Sinan Unur said:
What did you find out when you consulted the documentation?

I see no reference to how different platforms handle these files. All I see
is storing over a socket - which is not something I wish to do. If you can
find a section in the documentation which discusses this - I would be more
than happy to read it. If you intend to refer me to something called
"network order" then it would be nice if this were defined first.

Jack
 
A

A. Sinan Unur

I see no reference to how different platforms handle these files. All
I see is storing over a socket -

Specifically,

You can also store data in network order to allow easy sharing
across multiple platforms, or when storing on a socket known to
be remotely connected. The routines to call have an initial n
prefix for network, as in nstore and nstore_fd.

The use of 'or' means using nstore is not limited to only transmission
over sockets, but desirable whenever cross platform compatibility of
files is needed.
I would be more than happy to read it. If you intend to refer me to
something called "network order" then it would be nice if this were
defined first.

http://www.google.com/search?q=define:+network+order

Sinan
 
J

Joe Smith

A. Sinan Unur said:

Thanks for posting that link.
Going to http://en.wikipedia.org/wiki/Endianness brought back memories,
resulted in some minor edits, and inspired me to create a new entry for
the VT180 computer-in-a-terminal.

Ob Perl: pack()/unpack() use 'v' and 'V' for VAX format, which is the
antithesis of network byte order ('n' and 'N'). Portability is
increased by writing bytes to the disk in network byte order.

-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top