> > > >     - besize template 'aAuU', anything else tempplate I can use to
> > > >     prepare fix length data ? - if yes, but how do I assuming the
> > > >     block size is? In case,  if I write a binary file and I wanna
> > > >     use seek.
> > > 
> > > You are going to have to explain that in more detail.
> > 
> > In case, I am doing something like a log with User v TimesOfSignIn.
> > So, user name will set as 30 char long, and the Signin times is about
> > in scope of a normal integer. I wanna make this a simple DB for this
> > but not a list of single files for each user. So I wanna make this
> > doable for ramdom read write, so, that should be in a binary file. 
> 
> You want to have a look at DBM files. Read
>       perldoc DB_File
> or
>       perldoc SDBM_File
> 
> Or you may try to install DBD::SQLite. That would give you the full 
> power of SQL without having to install anything but the module.
> 
>  > However, as the file is in a binary, I think there could be a size
> > benfit for me to compress the data length. 
> 
>       "Premature optimization is the root of all evil."
> 
> How many users are we talking about? Millions? I would not sweat over 
> a few KB you might save.

Yes, that's very right, I should have to do that with some db modules!!! I
am sorry I missed something to declare here . I just do it as an experiment
to know and learn how pack works in this ways. 

So, I still looking for a pack way to get this job done. Actaully, I am still
quite confuse on what I can expect pack and unpack can giving help to me,
in furture. I guess I would have some light to know what pack is while this 
get done. 

Would you help for a little bit more ? Thanks in advise.

Reply via email to