in reply to Re: Comparing packed variables
in thread Comparing packed variables

Ah like that.
Is this a bug in Perl?
My data is already in native/little endian-ness so i cannot compare it with packed variables?

Replies are listed 'Best First'.
Re^3: Comparing packed variables
by GrandFather (Saint) on Mar 18, 2021 at 10:38 UTC

    No, it's not a bug. String compare works from lowest memory address (first byte) to highest comparing one byte from each string at a time. Little endian puts the least significant byte in lowest memory so the two lowest bytes are compared first which is exactly backwards to what you want.

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond