I too was once mystifyed by pack, until I read Confession of a Perl Hacker. If you want to really understand the concept behind pack (painlessly) and how to use it effectively read through that discussion.

In reply to Re: pack question by Arguile
in thread pack question by dash2

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":