in reply to Re: Re: use bytes and length problem
in thread use bytes and length problem
I tested the method on this page and several of those linked from it and it gives me the correct size every time (as compared to the same data dumped to a file in binmode).
I am pretty certain that the problem is that you are using unpack incorrectly. If you would care to post an example of the how you are using it, and a (small) sample of data that you are using it on, then I am certain that we could sort it the problem out.
Your reply to pfaut below indicates that you are either trying to use the '/' template character, which will never give you the answers that you require, or you are mixing up the information from different parts of the pack/[and unpack documentation--which would be no surprise as it is probably some of least understandable of the perldocs.
|
|---|