in reply to Re: Re: help needed on encoding a text file
in thread help needed on encoding a text file
pack("N(N/a*)",$index{$key},$key)! meaning that the $index{$key} is written as a Number, and the $key as a length-prefixed string.
The parenthesis are for grouping. Their meaning is half-hidden in the documentation...
Regarding the error: I don't get it. I tested the code.
The unpack is right as it is: it means "a series of pairs of Numbers and length-prefixed strings (in unpack you must not put the *, see the docs)
--
dakkar - Mobilis in mobile
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: help needed on encoding a text file
by bfdi533 (Friar) on Apr 07, 2003 at 19:38 UTC |