in reply to Re: Return values from package methods
in thread Return values from package methods
The pack function takes a list of values and converts these to the internal machine-level representation of the values as per the first argument to this function known as the "template". In my signature, this is used to convert a string with a 32-bit binary number into a machine-level representation of this value. The reverse of this is performed with the unpack function which converts from an internal machine-level representation to a string based again upon the template argument to the function. In the case of my signature, this outputs a big-endian order unsigned long integer representing the post number.
perl -le 'print+unpack"N",pack"B32","00000000000000000000001001111100"'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Return values from package methods
by SavannahLion (Pilgrim) on Aug 22, 2003 at 00:04 UTC | |
by rob_au (Abbot) on Aug 22, 2003 at 03:29 UTC |