You should have guessed that
pack() is the opposite of
unpack().
From perldoc -f pack:
The resulting string is the
concatenation of the converted values. Typically, each converted
value looks like its machine-level representation.
my $bytes = pack("n", 9); # network byte order for 0x0009
--
[ e d @ h a l l e y . c c ]