in reply to Re^2: unpack in incrementing variables
in thread unpack in incrementing variables

Counter intuitively (for me at least):

print unpack ('B16', pack('n', $_))."\n" for (250..260); 0000000011111010 0000000011111011 0000000011111100 0000000011111101 0000000011111110 0000000011111111 0000000100000000 0000000100000001 0000000100000010 0000000100000011 0000000100000100

the "network" format (big endian) does what I want on a little endian (Windows) system.


Perl is Huffman encoded by design.

Replies are listed 'Best First'.
Re^4: unpack in incrementing variables
by ikegami (Patriarch) on Oct 14, 2005 at 02:32 UTC
    Thanks. I was going to check that, but I was called away. I figured a partial post would guide someone on the right path.