Pack and unpack are two functions for transforming data according to a user-defined template, between the guarded way Perl stores values and some well-defined representation as might be required in the environment of a Perl program. Unfortunately, they're also two of the most misunderstood and most often overlooked functions that Perl provides.
As I usually print cheat sheets two pages per side and the pack/unpack cheat sheet consumed just one page, I added Perl's printf/sprintf format and attribute summary.
Here is how I printed this cheat sheet:
Download Perl pack/unpack and printf Cheat Sheet
- PDF document: perl.pack.unpack.printf.cheat.sheet.pdf
- MS Word document: perl.pack.unpack.printf.cheat.sheet.doc
See you next time!