Yes, I did notice that. My perldoc also has 'n' and 'v' as both unsigned; the OP may have problems with this as well.
A (long) while ago in grad school I was generating some data files containing a bunch of ints, and I was saving them in binary format. One of the better professors I worked with suggested I just save the data as ASCII text; admittedly there is a lot of space wasted, but ASCII portability is
much less of an issue. He was right.
| [reply] |
Numbers as text is indeed more portable... unless you happen to have a system that uses EBCDIC, UNICODE, etc. Enter HTML and XML, which allow you to specify the encoding. So what's simpler? Using XML, converting the ASCII to your platform's encoding, or specifying that the numbers are little-endian?
As for 'n' and 'v' being unsigned, that's why my solution above isn't as compacts as the others (but it works and it's portable!)
| [reply] |