Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Comparing packed variables

by Jaap (Curate)
on Mar 18, 2021 at 10:33 UTC ( [id://11129902]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11129902]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-16 18:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found