in reply to Re: Restoring a Data Structure from a File
in thread Restoring a Data Structure from a File

Kurt-

You did good in pointing out the KISS solution here, as I failed to properly state the scope of the problem in my original request.

Actually, this is how I started doing things, but ended up with data-feature-creep, as I kept adding bits of information about each usr@host. Things now look something like this:

'me@hawaii' => { 'SSHinfo' => { 'Login' => 'myusr@warm.hawaii.com', 'socks_proxy' => 'mysocksproxy.com', 'socks_port' => 1234, 'socks_protocol' => 4, 'identity_files' => [ "$HOME/.sshspecial/toolauth" ], 'user_known_hosts' => "$HOME/.sshspecial/knownhosts", }, ... }, ...
Having all this data tied to each entry, it'll be better for me to save the structure.

-Craig

Replies are listed 'Best First'.
Re^3: Restoring a Data Structure from a File
by KurtSchwind (Chaplain) on Nov 03, 2007 at 13:10 UTC
    I see what you mean by a structure now. At this point, you could consider XML, but I'd probably stick with something like CSV.
    As someone else mentioned, it's generally a good idea to store data format versioning in the file as well. If you go XML, it can be in a version= attribute. If you go CSV, make the first line have the col header information.
    --
    I used to drive a Heisenbergmobile, but everyone I looked at the speedometer, I got lost.