in reply to sprintf %X endianness
Endianness is not a factor.
sprintf %d, %x, %o and %b will always print the most significant digit of the number on the left.
On all platforms,
sprintf '%d', 4660 is 4660
sprintf '%X', 4660 is 1234
sprintf '%o', 4660 is 11064
sprintf '%b', 4660 is 1001000110100
In Section
Seekers of Perl Wisdom