On Thu, Oct 09, 2003 at 05:54:28PM +0100, Braun Brelin wrote:
> I tried doing a pack("H8",$key) where $key = <some valid key> and then passing
> that to the DbFind() function, but I'm getting back the following error:
Once thing to watch out for when using the pack() function is the count.
In _Programming Perl_ they warn you that when you use the hexadecimal pack,
you need to count the number of nibbles, not bytes.
Also, what, exactly could be in $key? You claim "<some valid key>" but is
it in a form that pack is going to expect?
You might also try breaking it up into something like
pack("A2","01") . pack("H12",$key)
You could always replace the "01" with a variable if it changes, but since
it is a character and not packed, you probably should treat it differently,
just for ease of use.
Dave
--
+----David Oksner-----http://www.case.net/----+
|Gibb's Law: |
| Infinity is one lawyer waiting for another.|
[log in to unmask]
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|