in reply to Unexpected Network conversion behaviour for unpack

I think that nNvV return unsigned results:

n An unsigned short in "network" (big-endian) order. N An unsigned long in "network" (big-endian) order. v An unsigned short in "VAX" (little-endian) order. V An unsigned long in "VAX" (little-endian) order.

Replies are listed 'Best First'.
Re^2: Unexpected Network conversion behaviour for unpack
by bart (Canon) on Feb 10, 2006 at 01:16 UTC
    This appears to be a fix in perlfunc, the older version on this site doesn't mention "unsigned" anywhere:
    n A short in "network" (big-endian) order. N A long in "network" (big-endian) order. v A short in "VAX" (little-endian) order. V A long in "VAX" (little-endian) order. (These 'shorts' and 'longs' are _exactly_ 16 bits and _exactly_ 32 bits, respectively.)
Re^2: Unexpected Network conversion behaviour for unpack
by GrandFather (Saint) on Feb 09, 2006 at 23:23 UTC

    Damn, I think I'll throw the Camel in the bin. It and the Perl Pocket Reference just say words to the effect that: n Short in network (big endien) order.

    Thanks for that. I should have looked at perlfunc earlier, I'd have saved a couple of hours!


    DWIM is Perl's answer to Gödel