From: "Bee" <[EMAIL PROTECTED]> > > > - 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. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>