in reply to Pack/unpack irregularity

I am guessing that you expect to see ...
unpacked: 12

as output. If my guess is right then you need to use ...
"H"
... instead of ...
"H*"
... in your pack and unpack calls.

Replies are listed 'Best First'.
Re: Re: Pack/unpack irregularity
by thor (Priest) on May 30, 2002 at 00:15 UTC
    This would work like a charm, except that my data is more than likely not going to be less than 16. With the changes you suggested, here is the output:
    >pack.pl 17 var: 17 temp: 11 packed: temp: 1 unpacked: 1 >

    thanks anyway,
    thor