411 REFERENCE · Wikibooks
Perl Programming/Keywords/pack
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Perl our package Keywords
The pack keyword
pack takes a LIST of values and converts it into a string using the rules defined in the TEMPLATE. The string returned is the concatenation of the appropriately converted values.
Syntax
pack TEMPLATE, LIST
Example
Following code
pack("n/a* w/a", "hello,", "world") outputs the line "\000\006hello,\005world"
See also
unpack
Perl our package Keywords