Similar to how you can use the package:
N An unsigned long (32-bit) in "network" (big-endian) order.
Is there any method for wrapping a 64-bit integer in the "big" endian order in Perl?
If your system supports Qpack format , you can use Q>to get big-endian (starting with Perl 5.9.2):
Q
Q>
% perl -e 'print pack("Q>", 1)' | hexdump -C 00000000 00 00 00 00 00 00 00 01 |........|