develooper Front page | perl.beginners | Postings from January 2002

FW: question on cook book example

January 4, 2002 10:21
FW: question on cook book example
Message ID:
| buy not exactly sure how this is working. tried looking at 
| perldoc pack
| but no luck. explanation is appreciated.

perldoc unpack gives the explanation:

  In addition to fields allowed in pack(), you may prefix a
  field with a %<number> to indicate that you want a
  <number>-bit checksum of the items instead of the items
  themselves.  Default is a 16-bit checksum.  Checksum is
  calculated by summing numeric values of expanded values (for
  string fields the sum of `ord($char)' is taken, for bit fields
  the sum of zeroes and ones).

Hope this helps,

-- mhx Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About