From: Eric Hodel Date: 2005-05-19T06:43:11+09:00 Subject: Re: (newbie Q) opposite of inspect for strings On 18 May 2005, at 14:25, Basile Starynkevitch [news] wrote: [snip the script] > A typical output of the above script is > > ab "12" > cd "45" > > where the file starts at the column a, and where keys and data are > separated by a tabulation. > > My goal was to code the corresponding loading script gdbmload; the > overall motivation for these 2 scripts is to manage under version > control (Subversion) a GDBM file (by dumping it to & reloading it from > a textual format, and by having a "canonical" dump format of it by > sorting the keys; I don"t want to version control the GDBM binary file > -because it is machine dependent- but a dump format of it, obtained > thru this gdbmdump script and the opposite gdbmload script to be > written) Ah-ha! You want YAML. It gives you a great plain-text representation that you can load/dump with ease and works great with revision control. -- Eric Hodel - drbrain@segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04