June 2019 Archives

Tech Tips: Handling Int Vectors in Perl 5

The Tips

Apparently, perldoc -f vec writes 16-bit / 32-bit / 64-bit quantities in big endian byte order, including on little endian architectures such as x86. This may cause issues when writing XS / etc. bindings.

I ended up using the following approach on x86-64 Linux…

About Shlomi Fish

user-pic An Israeli software developer, essayist, and writer, and an enthusiast of open/free software and cultural works. I've been working with Perl since 1996.