Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
类似于如何使用包:
N An unsigned long (32-bit) in "network" (big-endian) order.
是否有任何方法可以在 Perl 中以“网络”(大端)顺序打包 64 位整数?
如果您的系统支持Q打包格式,您可以使用Q>获取大端(Perl 5.9.2 起):
Q
Q>
% perl -e 'print pack("Q>", 1)' | hexdump -C 00000000 00 00 00 00 00 00 00 01 |........|