in reply to Re: (tye)Re: Detecting machine Endian-ness
in thread Detecting machine Endian-ness

Good point. I don't do anything with "wide" strings in Perl yet so I usually forget to take that into consideration. But here we are making the strings so we know they'll be byte strings and we can use what I wrote or: length pack "I", 0 to find the number of bytes in an IV.

I thought I had used a "native 32-bit integer" before for endianness testing, but for some reason couldn't think of "L". That certainly makes more sense than resorting to substr. (:

        - tye (but my friends call me "Tye")