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

FW: question on cook book example

From:
marcus_holland-moritz
Date:
January 4, 2002 10:21
Subject:
FW: question on cook book example
Message ID:
4B68A8D2B880D311BCB70090278CBF6202A7B6AE@cordelia
| 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



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About